using System; using System.Collections.Generic; using System.Text; using CommonLang.Property; using CommonAI.Zone.ZoneEditor; using CommonAI.Zone.Instance; using CommonAI.Zone.Attributes; using CommonAI.Zone.EventTrigger; namespace CommonAI.Zone.ZoneEditor.EventTrigger { //--------------------------------------------------------------------------------- #region __某个单位__ [DescAttribute("某个单位进入场景", "单位 - 某个单位")] public class GenericUnitAdded : AbstractTrigger { public override string ToString() { return string.Format("当某个单位进入场景"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitAdded(args, api.ZoneAPI); } } [DescAttribute("某个单位离开场景(被删除)", "单位 - 某个单位")] public class GenericUnitRemoved : AbstractTrigger { public override string ToString() { return string.Format("当某个单位离开场景"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitRemoved(args, api.ZoneAPI); } } [DescAttribute("某个单位被激活", "单位 - 某个单位")] public class GenericUnitActivated : AbstractTrigger { public override string ToString() { return string.Format("当某个单位被激活"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitActivated(args, api.ZoneAPI); } } [DescAttribute("某个单位受到伤害", "单位 - 某个单位")] public class GenericUnitDamaged : AbstractTrigger { public override string ToString() { return string.Format("当某个单位受到伤害"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitDamaged(args, api.ZoneAPI); } } [DescAttribute("某个单位中了Buff", "单位 - 某个单位")] public class GenericUnitGotBuff : AbstractTrigger { public override string ToString() { return string.Format("当某个单位中了Buff"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitGotBuff(args, api.ZoneAPI); } } [DescAttribute("某个单位失去Buff", "单位 - 某个单位")] public class GenericUnitLostBuff : AbstractTrigger { public override string ToString() { return string.Format("当某个单位失去Buff"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitLostBuff(args, api.ZoneAPI); } } [DescAttribute("某个单位死亡", "单位 - 某个单位")] public class GenericUnitDead : AbstractTrigger { public override string ToString() { return string.Format("当某个单位死亡"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitDead(args, api.ZoneAPI); } } [DescAttribute("某个单位复活", "单位 - 某个单位")] public class GenericUnitRebirth : AbstractTrigger { public override string ToString() { return string.Format("当某个单位复活"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitRebirth(args, api.ZoneAPI); } } [DescAttribute("某个单位获取物品到背包", "单位 - 某个单位")] public class GenericUnitGotItem : AbstractTrigger { public override string ToString() { return string.Format("当某个单位获取物品到背包"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitGotInventoryItem(args, api.ZoneAPI); } } [DescAttribute("某个单位失去物品从背包", "单位 - 某个单位")] public class GenericUnitLostItem : AbstractTrigger { public override string ToString() { return string.Format("当某个单位失去物品从背包"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitLostInventoryItem(args, api.ZoneAPI); } } [DescAttribute("某个单位检取场景物品", "单位 - 某个单位")] public class GenericUnitGotInstanceItem : AbstractTrigger { public override string ToString() { return string.Format("当某个单位检取场景物品"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitGotInstanceItem(args, api.ZoneAPI); } } [DescAttribute("某个单位使用物品", "单位 - 某个单位")] public class GenericUnitUseItem : AbstractTrigger { public override string ToString() { return string.Format("当某个单位使用物品"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitUseItem(args, api.ZoneAPI); } } [DescAttribute("某个单位点选其他单位", "单位 - 某个单位")] public class GenericUnitPickUnit : AbstractTrigger { public override string ToString() { return string.Format("当某个单位点选其他单位"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitPickUnit(args, api.ZoneAPI); } } [DescAttribute("某个单位释放技能", "单位 - 某个单位")] public class GenericUnitLaunchSkill : AbstractTrigger { public override string ToString() { return string.Format("当某个单位释放技能"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericUnitLaunchSkill(args, api.ZoneAPI); } } [DescAttribute("某个玩家准备完毕", "单位 - 某个单位")] public class GenericPlayReady : AbstractTrigger { public override string ToString() { return string.Format("当某个玩家准备完毕"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_GenericPlayerReady(args, api.ZoneAPI); } } #endregion //--------------------------------------------------------------------------------- #region __指定单位__ [DescAttribute("指定单位死亡", "单位 - 指定单位")] public class SpecifyUnitDead : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue.Editor Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})死亡", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (Unit.EditorName != null && Unit.EditorName.Length > 0) { String name = Unit.ToString(); api.listen_PointUnitDead(args, api.ZoneAPI, Unit.EditorName); } } } [DescAttribute("指定ID单位死亡", "单位 - 指定单位")] public class SpecifyUnitIDDead : AbstractTrigger { [DescAttribute("单位模板ID")] [TemplateIDAttribute(typeof(UnitInfo))] public int UnitTemplateID = 0; public override string ToString() { return string.Format("当({0})死亡", UnitTemplateID); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_PointUnitDead(args, api.ZoneAPI, null, UnitTemplateID); } } [DescAttribute("指定单位脱战", "单位 - 指定单位")] public class SpecifyUnitOutBattle : AbstractTrigger { [DescAttribute("单位模板ID")] [TemplateIDAttribute(typeof(UnitInfo))] public int UnitTemplateID = 0; public override string ToString() { return string.Format("当({0})脱战", UnitTemplateID); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_PointUnitOutBattle(args, api.ZoneAPI, UnitTemplateID); } } [DescAttribute("指定单位受伤", "单位 - 指定单位")] public class SpecifyUnitDamaged : AbstractTrigger { [DescAttribute("单位模板ID")] [TemplateIDAttribute(typeof(UnitInfo))] public int UnitTemplateID = 0; public override string ToString() { return string.Format("当({0})受到伤害", UnitTemplateID); } public override void Listen(EventTriggerAdapter api, EventArguments args) { api.listen_PointUnitIDDamaged(args, api.ZoneAPI, UnitTemplateID); } } /* * 有事件监听bug,不要用 [DescAttribute("指定单位被激活", "单位 - 指定单位")] public class SpecifyUnitActivated : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})被激活", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitActivated(args, unit); } } } [DescAttribute("指定单位攻击目标", "单位 - 指定单位")] public class SpecifyUnitAttack : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})攻击目标", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitAttack(args, unit); } } } [DescAttribute("指定单位受到伤害", "单位 - 指定单位")] public class SpecifyUnitDamaged : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})受到伤害", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitDamaged(args, unit); } } } [DescAttribute("指定单位复活", "单位 - 指定单位")] public class SpecifyUnitRebirth : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})复活", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitRebirth(args, unit); } } } [DescAttribute("指定单位获取物品到背包", "单位 - 指定单位")] public class SpecifyUnitGotItem : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})获取物品到背包", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitGotInventoryItem(args, unit); } } } [DescAttribute("指定单位失去物品从背包", "单位 - 指定单位")] public class SpecifyUnitLostItem : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})失去物品从背包", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitLostInventoryItem(args, unit); } } } [DescAttribute("指定单位使用物品", "单位 - 指定单位")] public class SpecifyUnitUseItem : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})使用物品", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitUseItem(args, unit); } } } [DescAttribute("指定单位检取场景物品", "单位 - 指定单位")] public class SpecifyUnitGotInstanceItem : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})检取场景物品", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitGotInstanceItem(args, unit); } } } [DescAttribute("指定单位中了BUFF", "单位 - 指定单位")] public class SpecifyUnitGotBuff : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})中了BUFF", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitGotBuff(args, unit); } } } [DescAttribute("指定单位失去BUFF", "单位 - 指定单位")] public class SpecifyUnitLostBuff : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})失去BUFF", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitLostBuff(args, unit); } } } [DescAttribute("指定单位释放技能", "单位 - 指定单位")] public class SpecifyUnitLaunchSkill : AbstractTrigger { [DescAttribute("单位 - 某个单位")] public UnitValue Unit = new UnitValue.Editor(); public override string ToString() { return string.Format("当({0})释放技能", Unit); } public override void Listen(EventTriggerAdapter api, EventArguments args) { InstanceUnit unit = Unit.GetValue(api, args); if (unit != null) { api.listen_SpecifyUnitLaunchSkill(args, unit); } } } */ #endregion //--------------------------------------------------------------------------------- //--------------------------------------------------------------------------------- #region __单位触发器_绑定的单位__ [DescAttribute("绑定的单位被激活", "单位触发器 - 绑定的单位")] public class BindingUnitActivated : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)被激活"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitActivated(args, api.UnitAPI); } } } [DescAttribute("绑定的单位攻击目标", "单位触发器 - 绑定的单位")] public class BindingUnitAttack : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)攻击目标"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitAttack(args, api.UnitAPI); } } } [DescAttribute("绑定的单位受到伤害", "单位触发器 - 绑定的单位")] public class BindingUnitDamaged : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)受到伤害"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitDamaged(args, api.UnitAPI); } } } [DescAttribute("绑定的单位死亡", "单位触发器 - 绑定的单位")] public class BindingUnitDead : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)死亡"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitDead(args, api.UnitAPI); } } } [DescAttribute("绑定的单位复活", "单位触发器 - 绑定的单位")] public class BindingUnitRebirth : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)复活"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitRebirth(args, api.UnitAPI); } } } [DescAttribute("绑定的单位获取物品到背包", "单位触发器 - 绑定的单位")] public class BindingUnitGotItem : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)获取物品到背包"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitGotInventoryItem(args, api.UnitAPI); } } } [DescAttribute("绑定的单位失去物品从背包", "单位触发器 - 绑定的单位")] public class BindingUnitLostItem : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)失去物品从背包"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitLostInventoryItem(args, api.UnitAPI); } } } [DescAttribute("绑定的单位使用物品", "单位触发器 - 绑定的单位")] public class BindingUnitUseItem : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)使用物品"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitUseItem(args, api.UnitAPI); } } } [DescAttribute("绑定的单位检取场景物品", "单位触发器 - 绑定的单位")] public class BindingUnitGotInstanceItem : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)检取场景物品"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitGotInstanceItem(args, api.UnitAPI); } } } [DescAttribute("绑定的单位中了BUFF", "单位触发器 - 绑定的单位")] public class BindingUnitGotBuff : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)中了BUFF"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitGotBuff(args, api.UnitAPI); } } } [DescAttribute("绑定的单位失去BUFF", "单位触发器 - 绑定的单位")] public class BindingUnitLostBuff : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)失去BUFF"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitLostBuff(args, api.UnitAPI); } } } [DescAttribute("绑定的单位释放技能", "单位触发器 - 绑定的单位")] public class BindingUnitLaunchSkill : AbstractTrigger { public override string ToString() { return string.Format("当(绑定的单位)释放技能"); } public override void Listen(EventTriggerAdapter api, EventArguments args) { if (api.UnitAPI != null) { api.listen_SpecifyUnitLaunchSkill(args, api.UnitAPI); } } } #endregion //--------------------------------------------------------------------------------- }