Ejemplo n.º 1
0
        private bool ListenBeingHit(EvtBeingHit evt)
        {
            if (!this._saveActive)
            {
                return(false);
            }
            if (evt.attackData.rejected)
            {
                return(false);
            }
            if (this._alliedIDs.Contains(evt.targetID))
            {
                AvatarActor other = Singleton <EventManager> .Instance.GetActor <AvatarActor>(evt.targetID);

                if ((other.HP == 0f) && other.IsOnStage())
                {
                    Singleton <LevelManager> .Instance.levelActor.TriggerSwapLocalAvatar(other.runtimeID, base.actor.runtimeID, true);

                    base.actor.abilityPlugin.HandleActionTargetDispatch(this.config.AdditionalActions, base.instancedAbility, base.instancedModifier, other, null);
                    this._saveCountRemains--;
                }
                if (this._saveCountRemains == 0)
                {
                    this.StopSaving();
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
        private bool CheckCanShowButtonAllowSwitchEffect()
        {
            bool        flag  = false;
            AvatarActor actor = Singleton <EventManager> .Instance.GetActor <AvatarActor>(Singleton <AvatarManager> .Instance.GetLocalAvatar().GetRuntimeID());

            if (((!Singleton <AvatarManager> .Instance.IsLocalAvatar(this._avatar.GetRuntimeID()) && (actor != null)) && (actor.IsOnStage() && !Singleton <LevelManager> .Instance.IsPaused())) && actor.AllowOtherSwitchIn)
            {
                flag = true;
            }
            return(flag);
        }