Beispiel #1
0
 public override bool RealUseSkill(SkillSlotType InSlot)
 {
     if (base.RealUseSkill(InSlot))
     {
         this._attackOneTargetCounter++;
         this._attackOneTargetCounterLast = 0;
         return(true);
     }
     return(false);
 }
 public bool TryGetSkillSlot(SkillSlotType _type, out SkillSlot _slot)
 {
     if (this.SkillSlotArray == null || _type < SkillSlotType.SLOT_SKILL_0 || _type >= SkillSlotType.SLOT_SKILL_COUNT)
     {
         _slot = null;
         return(false);
     }
     _slot = this.SkillSlotArray[(int)_type];
     return(_slot != null);
 }
Beispiel #3
0
        public void Init(SkillSlotType InSlot, uint ObjID)
        {
            this.SlotType    = InSlot;
            this.TargetID    = ObjID;
            this.TargetActor = Singleton <GameObjMgr> .GetInstance().GetActor(this.TargetID);

            this.UseVector   = (this.TargetActor ? this.TargetActor.handle.location : VInt3.zero);
            this.AppointType = SkillRangeAppointType.Target;
            this.bSpecialUse = false;
        }
Beispiel #4
0
        public bool IsUseSkillJoystick(SkillSlotType slot)
        {
            SkillSlot slot2;

            if (Singleton <GameInput> .GetInstance().IsSmartUse())
            {
                return(false);
            }
            return(this.TryGetSkillSlot(slot, out slot2) && slot2.IsUseSkillJoystick());
        }
Beispiel #5
0
 public void SetHostActorInfo(ref PoolObjHandle <ActorRoot> InHostActor, SkillSlotType InSpawnSkillSlot, bool bInCopyedHeroInfo)
 {
     this.HostActor         = InHostActor;
     this.SpawnSkillSlot    = InSpawnSkillSlot;
     this.isDisplayHeroInfo = bInCopyedHeroInfo;
     if (this.HostActor != 0)
     {
         this.HostActor.handle.ActorControl.eventActorDead += new ActorEventHandler(this.OnActorDead);
     }
 }
Beispiel #6
0
        private bool IsIngnoreDisableSkill(SkillSlotType _type)
        {
            SkillSlot slot = null;

            if ((_type < SkillSlotType.SLOT_SKILL_0) || (_type >= SkillSlotType.SLOT_SKILL_COUNT))
            {
                return(false);
            }
            return((this.TryGetSkillSlot(_type, out slot) && (slot.SkillObj != null)) && ((slot.SkillObj.cfgData != null) && (slot.SkillObj.cfgData.bBIngnoreDisable == 1)));
        }
Beispiel #7
0
        protected override void CopyData(BaseEvent src)
        {
            base.CopyData(src);
            SetNextSkillTargetTick setNextSkillTargetTick = src as SetNextSkillTargetTick;

            this.targetId          = setNextSkillTargetTick.targetId;
            this.nextSkillTargetID = setNextSkillTargetTick.nextSkillTargetID;
            this.slotType          = setNextSkillTargetTick.slotType;
            this.clear             = setNextSkillTargetTick.clear;
        }
Beispiel #8
0
        public void Init(SkillSlotType InSlot, uint ObjID)
        {
            this.SlotType    = InSlot;
            this.TargetID    = ObjID;
            this.TargetActor = Singleton <GameObjMgr> .GetInstance().GetActor(this.TargetID);

            this.UseVector   = ((!this.TargetActor) ? VInt3.zero : this.TargetActor.get_handle().location);
            this.AppointType = 1;
            this.bSpecialUse = false;
        }
Beispiel #9
0
        protected override EBTStatus update_impl(Agent pAgent, EBTStatus childStatus)
        {
            EBTStatus     result          = EBTStatus.BT_SUCCESS;
            int           srchR           = (int)pAgent.GetVariable(1944425156u);
            SkillSlotType inSlot          = (SkillSlotType)((int)pAgent.GetVariable(7107675u));
            uint          lowHpTeamMember = ((ObjAgent)pAgent).GetLowHpTeamMember(srchR, this.opr_p1, inSlot);

            pAgent.SetVariable <uint>("p_teamTarget", lowHpTeamMember, 1081825808u);
            return(result);
        }
Beispiel #10
0
 public bool GetCacheSkillSlotType(out SkillSlotType _slotType)
 {
     if (!this.cacheSkillExpire)
     {
         _slotType = this.cacheSkillParam.SlotType;
         return(true);
     }
     _slotType = SkillSlotType.SLOT_SKILL_VALID;
     return(false);
 }
Beispiel #11
0
 public bool GetCacheSkillSlotType(out SkillSlotType _slotType)
 {
     if ((this.cacheSkillContext != null) && !this.cacheSkillExpire)
     {
         _slotType = this.cacheSkillContext.SlotType;
         return(true);
     }
     _slotType = SkillSlotType.SLOT_SKILL_VALID;
     return(false);
 }
        public GameObject GetPrefabEffectObj(SkillSlotType slot)
        {
            SkillSlot skillSlot;

            if (this.TryGetSkillSlot(slot, out skillSlot) && skillSlot != null && skillSlot.skillIndicator != null)
            {
                return(skillSlot.skillIndicator.effectPrefab);
            }
            return(null);
        }
Beispiel #13
0
        protected override EBTStatus update_impl(Agent pAgent, EBTStatus childStatus)
        {
            EBTStatus     status   = EBTStatus.BT_SUCCESS;
            int           variable = (int)pAgent.GetVariable((uint)0x73e592c4);
            SkillSlotType inSlot   = (SkillSlotType)((int)pAgent.GetVariable((uint)0x6c745b));
            uint          num2     = ((ObjAgent)pAgent).GetLowHpTeamMember(variable, this.opr_p1, inSlot);

            pAgent.SetVariable <uint>("p_teamTarget", num2, 0x407b5a10);
            return(status);
        }
Beispiel #14
0
        public Skill FindSkill(SkillSlotType slot)
        {
            SkillSlot slot2;

            if (this.TryGetSkillSlot(slot, out slot2))
            {
                return(slot2.SkillObj);
            }
            return(null);
        }
Beispiel #15
0
        public SkillUseContext(SkillSlotType InSlot, uint ObjID)
        {
            this.GatherTime  = 1;
            this.SlotType    = InSlot;
            this.TargetID    = ObjID;
            this.TargetActor = Singleton <GameObjMgr> .GetInstance().GetActor(this.TargetID);

            this.UseVector   = (this.TargetActor == 0) ? VInt3.zero : this.TargetActor.handle.location;
            this.AppointType = SkillRangeAppointType.Target;
            this.bSpecialUse = false;
        }
Beispiel #16
0
        public void CancelUseSkillSlot(SkillSlotType slot)
        {
            SkillSlot slot2;

            if (this.TryGetSkillSlot(slot, out slot2))
            {
                slot2.CancelUseSkill();
                DefaultSkillEventParam param = new DefaultSkillEventParam(slot, 0);
                Singleton <GameSkillEventSys> .GetInstance().SendEvent <DefaultSkillEventParam>(GameSkillEventDef.Event_UseCanceled, base.actorPtr, ref param, GameSkillEventChannel.Channel_HostCtrlActor);
            }
        }
        public bool CanUseSkill(SkillSlotType slotType)
        {
            if (this.CurUseSkill != null && !this.CurUseSkill.canAbort((SkillAbortType)slotType))
            {
                return(false);
            }
            Skill     skill = this.FindSkill(slotType);
            SkillSlot skillSlot;

            return(skill != null && skill.cfgData != null && this.TryGetSkillSlot(slotType, out skillSlot) && skillSlot.IsEnableSkillSlot());
        }
Beispiel #18
0
 private void SpawnSkillEffect(int _skillCombineID, SkillSlotType _slotType, bool inExposing)
 {
     if (this.buffHolder.actorPtr)
     {
         SkillUseParam skillUseParam = default(SkillUseParam);
         skillUseParam.SlotType = _slotType;
         skillUseParam.SetOriginator(this.buffHolder.actorPtr);
         skillUseParam.bExposing = inExposing;
         this.buffHolder.actorPtr.get_handle().SkillControl.SpawnBuff(this.buffHolder.actorPtr, ref skillUseParam, _skillCombineID, true);
     }
 }
        protected override void CopyData(BaseEvent src)
        {
            base.CopyData(src);
            SkillCDTriggerDuration skillCDTriggerDuration = src as SkillCDTriggerDuration;

            this.targetId        = skillCDTriggerDuration.targetId;
            this.useSlotType     = skillCDTriggerDuration.useSlotType;
            this.slotType        = skillCDTriggerDuration.slotType;
            this.abortReduceTime = skillCDTriggerDuration.abortReduceTime;
            this.bAbortReduce    = skillCDTriggerDuration.bAbortReduce;
        }
Beispiel #20
0
 public void Reset()
 {
     this.SlotType    = SkillSlotType.SLOT_SKILL_0;
     this.AppointType = SkillRangeAppointType.Auto;
     this.TargetID    = 0;
     this.UseVector   = VInt3.zero;
     this.bSpecialUse = false;
     this.TargetActor.Release();
     this.Originator.Release();
     this.Instigator = null;
 }
        private void DoHighlight(bool bYes)
        {
            bool          flag          = this.EnterUniqueId > 0;
            SkillSlotType enterUniqueId = (SkillSlotType)this.EnterUniqueId;
            bool          bAll          = enterUniqueId == SkillSlotType.SLOT_SKILL_COUNT;

            if (flag)
            {
                Singleton <BattleSkillHudControl> .GetInstance().Highlight(enterUniqueId, bYes, bAll, false, false, false, 0);
            }
        }
        protected override void CopyData(BaseEvent src)
        {
            base.CopyData(src);
            HurtTriggerDuration hurtTriggerDuration = src as HurtTriggerDuration;

            this.targetID               = hurtTriggerDuration.targetID;
            this.iTriggerInterval       = hurtTriggerDuration.iTriggerInterval;
            this.iTriggerSkillCombineID = hurtTriggerDuration.iTriggerSkillCombineID;
            this.slotType               = hurtTriggerDuration.slotType;
            this.iMaxTriggerCount       = hurtTriggerDuration.iMaxTriggerCount;
        }
Beispiel #23
0
 public void ValidateLevel(SkillSlotType slot)
 {
     if (this._curActor != 0)
     {
         int index = ((int)slot) - 1;
         if ((index >= 0) && (index < this._skillLevels.Length))
         {
             SkillSlot slot2 = this._curActor.handle.SkillControl.SkillSlotArray[(int)slot];
             this._skillLevels[index].text = slot2.GetSkillLevel().ToString();
         }
     }
 }
Beispiel #24
0
 public void ValidateCD(SkillSlotType slot)
 {
     if (this._curActor != 0)
     {
         int index = ((int)slot) - 1;
         if ((index >= 0) && (index < this._skillCdBgs.Length))
         {
             SkillSlot slot2 = this._curActor.handle.SkillControl.SkillSlotArray[(int)slot];
             this._skillCdBgs[index].fillAmount = ((float)slot2.CurSkillCD) / ((float)slot2.GetSkillCDMax());
         }
     }
 }
 public static string SetHeroSkillLevel(SkillSlotType Slot, byte Level)
 {
     if (Singleton <GameStateCtrl> .get_instance().isBattleState)
     {
         FrameCommand <SetSkillLevelInBattleCommand> frameCommand = FrameCommandFactory.CreateFrameCommand <SetSkillLevelInBattleCommand>();
         frameCommand.cmdData.SkillSlot  = (byte)Slot;
         frameCommand.cmdData.SkillLevel = Level;
         frameCommand.Send();
         return("已发出指令");
     }
     return("仅限局内");
 }
Beispiel #26
0
 public SkillSlot(SkillSlotType type)
 {
     this.SkillStatistictInfo = new SKILLSTATISTICTINFO();
     this.IsCDReady           = true;
     this.SlotType            = type;
     this.bLimitUse           = false;
     this.skillChangeEvent    = new SkillChangeEvent(this);
     this.skillIndicator      = new SkillControlIndicator(this);
     this.changeSkillCDRate   = 0;
     this.lLastUseTime        = 0L;
     this.CurSkillCD          = 0;
 }
    public static void AddIndicatorData(SkillSlotType slotType, string normalImg, string redImg, float smallImgHeight, float bigImgHeight)
    {
        MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys;

        if (theMinimapSys == null)
        {
            return;
        }
        if (theMinimapSys.MMinimapSkillIndicator_3Dui != null && !theMinimapSys.MMinimapSkillIndicator_3Dui.BDataInited)
        {
            theMinimapSys.MMinimapSkillIndicator_3Dui.AddInitData(slotType, normalImg, redImg, smallImgHeight, bigImgHeight);
        }
    }
Beispiel #28
0
 public SkillSlot(SkillSlotType type)
 {
     this.IsCDReady         = true;
     this.SlotType          = type;
     this.bLimitUse         = false;
     this.skillChangeEvent  = new SkillChangeEvent(this);
     this.skillIndicator    = new SkillControlIndicator(this);
     this.changeSkillCDRate = 0;
     this.lLastUseTime      = 0L;
     this.CurSkillCD        = 0;
     this.skillUseCount     = 0;
     this.keyPressTime      = 0f;
 }
Beispiel #29
0
        public bool IsDisableSkillSlot(SkillSlotType _type)
        {
            int index = (int)_type;

            if (this.IsIngnoreDisableSkill(_type))
            {
                return(false);
            }
            if ((_type < SkillSlotType.SLOT_SKILL_0) || (_type >= SkillSlotType.SLOT_SKILL_COUNT))
            {
                return(false);
            }
            return(this.DisableSkill[index] > 0);
        }
Beispiel #30
0
        public void ValidateCD(SkillSlotType slot)
        {
            if (!this._curActor)
            {
                return;
            }
            int num = slot - SkillSlotType.SLOT_SKILL_1;

            if (num >= 0 && num < this._skillCdBgs.Length)
            {
                SkillSlot skillSlot = this._curActor.get_handle().SkillControl.SkillSlotArray[(int)slot];
                this._skillCdBgs[num].fillAmount = (float)skillSlot.CurSkillCD / (float)skillSlot.GetSkillCDMax();
            }
        }