public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger = false;
     base.Init(_source, _event, ref _config);
     this.sourceActor.handle.ActorControl.eventActorEnterCombat += new ActorEventHandler(this.onActorEnterBattle);
     this.sourceActor.handle.ActorControl.eventActorExitCombat  += new ActorEventHandler(this.onActorExitBattle);
 }
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger     = false;
     this.InGrassCount = 0;
     base.Init(_source, _event, ref _config);
     Singleton <GameEventSys> .instance.AddEventHandler <ActorInGrassParam>(GameEventDef.Event_ActorInGrass, new RefAction <ActorInGrassParam>(this.SetInGrassStatusByTrigger));
 }
示例#3
0
        public void Init()
        {
            this.SlotType       = SkillSlotType.SLOT_SKILL_VALID;
            this.ActionName     = StringHelper.UTF8BytesToString(ref this.cfgData.szActionName);
            this.bAgeImmeExcute = (this.cfgData.bAgeImmeExcute == 1);
            if (this.sourceActor)
            {
                this.skillContext.uiFromId     = this.sourceActor.handle.ObjID;
                this.skillContext.skillUseFrom = SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_PASSIVESKILL;
            }
            this.passiveEvent = Singleton <PassiveCreater <PassiveEvent, PassiveEventAttribute> > .GetInstance().Create((int)this.cfgData.dwPassiveEventType);

            if (this.passiveEvent == null)
            {
                return;
            }
            for (int i = 0; i < 2; i++)
            {
                int dwConditionType = (int)this.cfgData.astPassiveConditon[i].dwConditionType;
                PassiveCondition passiveCondition = Singleton <PassiveCreater <PassiveCondition, PassiveConditionAttribute> > .GetInstance().Create(dwConditionType);

                if (passiveCondition != null)
                {
                    this.passiveEvent.AddCondition(passiveCondition);
                }
            }
            this.passiveEvent.Init(this.sourceActor, this);
        }
示例#4
0
        public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
        {
            this.bTrigger = false;
            base.Init(_source, _event, ref _config);
            Singleton <GameSkillEventSys> .instance.AddEventHandler <LimitMoveEventParam>(GameSkillEventDef.AllEvent_LimitMove, new GameSkillEvent <LimitMoveEventParam>(this.onActorLimitMove));

            Singleton <GameSkillEventSys> .instance.AddEventHandler <LimitMoveEventParam>(GameSkillEventDef.AllEvent_CancelLimitMove, new GameSkillEvent <LimitMoveEventParam>(this.onActorCancelLimitMove));
        }
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bHpTrigger = false;
     base.Init(_source, _event, ref _config);
     if (_source)
     {
         _source.handle.ValueComponent.HpChgEvent += new ValueChangeDelegate(this.OnHpChange);
     }
 }
示例#6
0
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger = true;
     base.Init(_source, _event, ref _config);
     if (((_source != 0) && (_source.handle.BuffHolderComp != null)) && (_source.handle.BuffHolderComp.SpawnedBuffList != null))
     {
         for (int i = 0; i < _source.handle.BuffHolderComp.SpawnedBuffList.Count; i++)
         {
             BuffSkill skill = _source.handle.BuffHolderComp.SpawnedBuffList[i];
             if (((skill != null) && (skill.cfgData != null)) && (skill.cfgData.iCfgID == base.localParams[0]))
             {
                 this.bTrigger = false;
                 break;
             }
         }
     }
     Singleton <GameSkillEventSys> .GetInstance().AddEventHandler <BuffChangeEventParam>(GameSkillEventDef.AllEvent_BuffChange, new GameSkillEvent <BuffChangeEventParam>(this.OnPlayerBuffChange));
 }
示例#7
0
        public void Init()
        {
            this.SlotType     = SkillSlotType.SLOT_SKILL_VALID;
            base.ActionName   = StringHelper.UTF8BytesToString(ref this.cfgData.szActionName);
            this.passiveEvent = Singleton <PassiveCreater <PassiveEvent, PassiveEventAttribute> > .GetInstance().Create((int)this.cfgData.dwPassiveEventType);

            if (this.passiveEvent != null)
            {
                PassiveCondition condition = null;
                for (int i = 0; i < 2; i++)
                {
                    int dwConditionType = (int)this.cfgData.astPassiveConditon[i].dwConditionType;
                    condition = Singleton <PassiveCreater <PassiveCondition, PassiveConditionAttribute> > .GetInstance().Create(dwConditionType);

                    if (condition != null)
                    {
                        this.passiveEvent.AddCondition(condition);
                    }
                }
                this.passiveEvent.Init(this.sourceActor, this);
            }
        }
 public virtual void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.rootEvent   = _event;
     this.sourceActor = _source;
     this.SetConditionParam(ref _config);
 }
示例#9
0
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger = false;
     base.Init(_source, _event, ref _config);
     Singleton <GameEventSys> .instance.AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_ActorImmuneDeadHurt, new RefAction <DefaultGameEventParam>(this.onImmuneDeadHurt));
 }
示例#10
0
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bHurt = false;
     base.Init(_source, _event, ref _config);
     Singleton <GameEventSys> .instance.AddEventHandler <HurtEventResultInfo>(GameEventDef.Event_ActorDamage, new RefAction <HurtEventResultInfo>(this.onActorDamage));
 }
示例#11
0
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger = false;
     base.Init(_source, _event, ref _config);
     Singleton <GameEventSys> .get_instance().AddEventHandler <DefaultGameEventParam>(GameEventDef.Event_ActorBeAttack, new RefAction <DefaultGameEventParam>(this.Expose));
 }
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bKilled = false;
     base.Init(_source, _event, ref _config);
     this.sourceActor.get_handle().ActorControl.eventActorDead += new ActorDeadEventHandler(this.onActorDead);
 }
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger = false;
     base.Init(_source, _event, ref _config);
     Singleton <EventRouter> .GetInstance().AddEventHandler <PoolObjHandle <ActorRoot>, int>("HeroSoulLevelChange", new Action <PoolObjHandle <ActorRoot>, int>(this, (IntPtr)this.onActorUpgrade));
 }
示例#14
0
 public override void Init(PoolObjHandle <ActorRoot> _source, PassiveEvent _event, ref ResDT_SkillPassiveCondition _config)
 {
     this.bTrigger = false;
     base.Init(_source, _event, ref _config);
     Singleton <GameSkillEventSys> .get_instance().AddEventHandler <ActorSkillEventParam>(GameSkillEventDef.AllEvent_UseSkill, new GameSkillEvent <ActorSkillEventParam>(this.onActorUseSkill));
 }