示例#1
0
 public override bool ListenEvent(BaseEvent evt)
 {
     return((evt is EvtBeingHit) && this.ListenBeingHit((EvtBeingHit)evt));
 }
 public override bool ListenEvent(BaseEvent evt)
 {
     return((evt is EvtLevelBuffState) && this.ListenLevelBuffState((EvtLevelBuffState)evt));
 }
示例#3
0
        public void ApplyLevelBuff_AuthorityHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
        {
            LevelBuffSide  overrideCurSide;
            ApplyLevelBuff config    = (ApplyLevelBuff)actionConfig;
            float          duration  = base._Internal_CalculateApplyLevelBuffDuration(config, instancedAbility, evt);
            uint           runtimeID = instancedAbility.caster.runtimeID;

            if (config.UseOverrideCurSide)
            {
                overrideCurSide = config.OverrideCurSide;
            }
            else
            {
                overrideCurSide = base.CalculateLevelBuffSide(instancedAbility.caster.runtimeID);
            }
            MPSendPacketContainer pc = Singleton <MPManager> .Instance.CreateSendPacket <Packet_Level_RequestLevelBuff>();

            Packet_Level_RequestLevelBuff.StartPacket_Level_RequestLevelBuff(pc.builder);
            Packet_Level_RequestLevelBuff.AddLevelBuffType(pc.builder, (byte)config.LevelBuff);
            Packet_Level_RequestLevelBuff.AddEnteringSlow(pc.builder, config.EnteringTimeSlow);
            Packet_Level_RequestLevelBuff.AddAllowRefresh(pc.builder, config.LevelBuffAllowRefresh);
            Packet_Level_RequestLevelBuff.AddSide(pc.builder, (byte)overrideCurSide);
            Packet_Level_RequestLevelBuff.AddOwnerRuntimeID(pc.builder, runtimeID);
            Packet_Level_RequestLevelBuff.AddNotStartEffect(pc.builder, config.NotStartEffect);
            Packet_Level_RequestLevelBuff.AddDuration(pc.builder, duration);
            Packet_Level_RequestLevelBuff.AddInstancedAbilityID(pc.builder, (byte)instancedAbility.instancedAbilityID);
            Packet_Level_RequestLevelBuff.AddActionLocalID(pc.builder, (byte)config.localID);
            pc.Finish <Packet_Level_RequestLevelBuff>(Packet_Level_RequestLevelBuff.EndPacket_Level_RequestLevelBuff(pc.builder));
            Singleton <MPManager> .Instance.SendReliableToPeer(0x21800001, 1, pc);

            Singleton <MPLevelManager> .Instance.levelActor.GetPlugin <MPLevelAbilityHelperPlugin>().AttachPendingModifiersToNextLevelBuff(config, base._owner.runtimeID, instancedAbility.instancedAbilityID, (target != null) ? target.runtimeID : 0);
        }
 public override bool OnPostEvent(BaseEvent evt)
 {
     return((evt is EvtBeingHit) && this.OnPostBeingHit((EvtBeingHit)evt));
 }
示例#5
0
 public override bool OnEventResolves(BaseEvent evt)
 {
     return((evt is EvtBeingHit) && this.OnBeingHitResolve((EvtBeingHit)evt));
 }
示例#6
0
 public sealed override bool OnEvent(BaseEvent evt)
 {
     return((!this._identity.isAuthority && (evt.remoteState == EventRemoteState.IsRemoteReceiveHandledReplcated)) && this.OnRemoteReplicatedEvent(evt));
 }
示例#7
0
 private bool RejectRemoteReplicatedResults(BaseEvent evt)
 {
     return(evt.remoteState == EventRemoteState.IsRemoteReceiveHandledReplcated);
 }
示例#8
0
 protected override void HandleAction(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt)
 {
     if (this._abilityIdentity.isAuthority && base.EvaluateAbilityPredicate(actionConfig.Predicates, instancedAbility, instancedModifier, target, evt))
     {
         RecordInvokeEntryContext context;
         this.StartRecordInvokeEntry(instancedAbility.instancedAbilityID, (instancedModifier == null) ? 0 : instancedModifier.instancedModifierID, (target != null) ? target.runtimeID : base._owner.runtimeID, actionConfig.localID, out context);
         actionConfig.MPGetAuthorityHandler(this)(actionConfig, instancedAbility, instancedModifier, target, evt, ref context);
     }
 }
示例#9
0
 protected override void HandleActionTargetDispatch(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor other, BaseEvent evt, Func <BaseAbilityActor, bool> targetPredicate)
 {
     if (this._abilityIdentity.isAuthority)
     {
         base.HandleActionTargetDispatch(actionConfig, instancedAbility, instancedModifier, other, evt, targetPredicate);
     }
 }
示例#10
0
 public override bool ListenEvent(BaseEvent evt)
 {
     return((evt is EvtKilled) && this.ListenKill((EvtKilled)evt));
 }
示例#11
0
 public void DamageByAttackValue_AuthorityHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     base.DamageByAttackValueHandler(actionConfig, instancedAbility, instancedModifier, target, evt);
 }
示例#12
0
 public override bool ListenEvent(BaseEvent evt)
 {
     if (!Singleton <LevelManager> .Instance.IsPaused())
     {
         if (evt is EvtStageReady)
         {
             return(this.ListenStageReady((EvtStageReady)evt));
         }
         if (evt is EvtBeingHit)
         {
             return(this.ListenBeingHit((EvtBeingHit)evt));
         }
         if (evt is EvtAttackStart)
         {
             return(this.ListenAttackStart((EvtAttackStart)evt));
         }
         if (evt is EvtLevelBuffState)
         {
             return(this.ListenLevelBuffState((EvtLevelBuffState)evt));
         }
         if (evt is EvtEvadeStart)
         {
             return(this.ListenEvadeStart((EvtEvadeStart)evt));
         }
         if (evt is EvtDefendStart)
         {
             return(this.ListenDefendStart((EvtDefendStart)evt));
         }
         if (evt is EvtEvadeSuccess)
         {
             return(this.ListenEvadeSuccess((EvtEvadeSuccess)evt));
         }
         if (evt is EvtDefendSuccess)
         {
             return(this.ListenDefendSuccess((EvtDefendSuccess)evt));
         }
         if (evt is EvtSkillStart)
         {
             return(this.ListenSkillStart((EvtSkillStart)evt));
         }
         if (evt is EvtAvatarCreated)
         {
             return(this.ListenAvatarCreated((EvtAvatarCreated)evt));
         }
         if (evt is EvtAvatarSwapInEnd)
         {
             return(this.ListenAvatarSwapInEnd((EvtAvatarSwapInEnd)evt));
         }
         if (evt is EvtAvatarSwapOutStart)
         {
             return(this.ListenAvatarSwapOutStart((EvtAvatarSwapOutStart)evt));
         }
         if (evt is EvtMonsterCreated)
         {
             this.ListenMonsterCreated((EvtMonsterCreated)evt);
         }
         else if (evt is EvtKilled)
         {
             this.ListenKilled((EvtKilled)evt);
         }
     }
     return(false);
 }
示例#13
0
 public virtual bool OnPostEvent(BaseEvent evt)
 {
     return(false);
 }
示例#14
0
 public virtual bool ListenEvent(BaseEvent evt)
 {
     return(false);
 }
示例#15
0
 public override bool OnEvent(BaseEvent evt)
 {
     return((evt is EvtKilled) && this.OnKilled((EvtKilled)evt));
 }
示例#16
0
 public void HealSP_AuthorityHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     this.HealSP_Common((HealSP)actionConfig, instancedAbility, target);
     context.Finish(true);
 }
 public override bool ListenEvent(BaseEvent evt)
 {
     return((evt is EvtSkillStart) && this.ListenSkillStart((EvtSkillStart)evt));
 }
示例#18
0
 public void Predicated_AuthorityHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     base.PredicatedHandler(actionConfig, instancedAbility, instancedModifier, target, evt);
 }
示例#19
0
 protected abstract bool OnRemoteReplicatedEvent(BaseEvent evt);
示例#20
0
 public void RemoveModifier_AuthorityHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     MoleMole.Config.RemoveModifier modifier = (MoleMole.Config.RemoveModifier)actionConfig;
     if (target == base._owner)
     {
         base._owner.abilityPlugin.TryRemoveModifier(instancedAbility, modifier.ModifierName);
     }
     else if (Singleton <MPEventManager> .Instance.IsIdentityAuthority(target.runtimeID))
     {
         target.abilityPlugin.TryRemoveModifier(instancedAbility, modifier.ModifierName);
     }
     else
     {
         context.Finish(true);
     }
 }
示例#21
0
 public override bool ListenEvent(BaseEvent evt)
 {
     return(base.ListenEvent(evt));
 }
示例#22
0
 public static void STUB_AuthorityMute(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     context.Finish(false);
 }
示例#23
0
 public override bool OnEventWithPlugins(BaseEvent evt)
 {
     return((!(evt is EvtAvatarSwapInEnd) && !(evt is EvtAvatarSwapOutStart)) && base.OnEventWithPlugins(evt));
 }
示例#24
0
 public void TriggerAbility_AuthorityHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     base.TriggerAbilityHandler(actionConfig, instancedAbility, instancedModifier, target, evt);
     context.Finish(true);
 }
示例#25
0
 public override bool OnPostEvent(BaseEvent evt)
 {
     return((evt is EvtHittingOther) && this.OnPostHittingOther((EvtHittingOther)evt));
 }
示例#26
0
 public override bool OnEvent(BaseEvent evt)
 {
     return((evt is EvtEvadeSuccess) && this.OnEvadeSuccess((EvtEvadeSuccess)evt));
 }