Ejemplo n.º 1
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);
     }
 }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
 public void RemoveModifier_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
     MoleMole.Config.RemoveModifier modifier = (MoleMole.Config.RemoveModifier)actionConfig;
     if ((target != base._owner) && Singleton <MPEventManager> .Instance.IsIdentityAuthority(target.runtimeID))
     {
         target.abilityPlugin.TryRemoveModifier(instancedAbility, modifier.ModifierName);
     }
 }
Ejemplo n.º 4
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);
     }
 }
Ejemplo n.º 5
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);
     }
 }
Ejemplo n.º 6
0
 public void TriggerAbility_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
     base.TriggerAbilityHandler(actionConfig, instancedAbility, instancedModifier, target, null);
 }
Ejemplo n.º 7
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);
 }
Ejemplo n.º 8
0
 public static void STUB_RemoteMute(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, Table argument)
 {
 }
Ejemplo n.º 9
0
 public static void STUB_AuthorityMute(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, BaseEvent evt, ref RecordInvokeEntryContext context)
 {
     context.Finish(false);
 }
Ejemplo n.º 10
0
 public void SetAnimatorBool_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
     base.SetAnimatorBoolHandler(actionConfig, instancedAbility, instancedModifier, target, null);
 }
Ejemplo n.º 11
0
 public void AvatarSKillStart_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
     base.AvatarSkillStartHandler(actionConfig, instancedAbility, instancedModifier, target, null);
 }
Ejemplo n.º 12
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);
 }
Ejemplo n.º 13
0
 public void HealSP_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
     this.HealSP_Common((HealSP)actionConfig, instancedAbility, target);
 }
Ejemplo n.º 14
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);
 }
Ejemplo n.º 15
0
        public void HandleInvokes(Packet_Ability_InvocationTable table, int fromPeerID)
        {
            int invokesLength = table.InvokesLength;

            for (int i = 0; i < invokesLength; i++)
            {
                AbilityInvokeEntry invokes = table.GetInvokes(i);
                if (invokes.LocalID == 0xff)
                {
                    if (this._abilityIdentity.isAuthority)
                    {
                        this.MetaAuthorityInvokeHandler(invokes);
                    }
                    else
                    {
                        this.MetaRemoteInvokeHandler(invokes);
                    }
                }
                else
                {
                    ActorAbility     parentAbility;
                    ActorModifier    instancedModifierByID;
                    uint             target = invokes.Target;
                    BaseAbilityActor actor  = (target != 0) ? Singleton <EventManager> .Instance.GetActor <BaseAbilityActor>(target) : base._owner;

                    if (actor == null)
                    {
                        return;
                    }
                    int instancedModifierID = invokes.InstancedModifierID;
                    if (instancedModifierID != 0)
                    {
                        instancedModifierByID = this.GetInstancedModifierByID(instancedModifierID);
                        parentAbility         = instancedModifierByID.parentAbility;
                    }
                    else
                    {
                        instancedModifierByID = null;
                        parentAbility         = this.GetInstancedAbilityByID(invokes.InstancedAbilityID);
                    }
                    BaseActionContainer container = parentAbility.config.InvokeSites[invokes.LocalID];
                    if (container is ConfigAbilityAction)
                    {
                        ConfigAbilityAction actionConfig = (ConfigAbilityAction)container;
                        actionConfig.MPGetRemoteHandler(this)(actionConfig, parentAbility, instancedModifierByID, actor, invokes);
                    }
                    else
                    {
                        BaseAbilityMixin instancedMixin = null;
                        if (instancedModifierByID != null)
                        {
                            instancedMixin = instancedModifierByID.GetInstancedMixin(invokes.LocalID);
                        }
                        if (instancedMixin == null)
                        {
                            instancedMixin = parentAbility.GetInstancedMixin(invokes.LocalID);
                        }
                        instancedMixin.HandleMixinInvokeEntry(invokes, fromPeerID);
                    }
                }
            }
        }
Ejemplo n.º 16
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);
 }
Ejemplo n.º 17
0
 public void ApplyLevelBuff_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
 }
Ejemplo n.º 18
0
 public void AttachEffect_RemoteHandler(ConfigAbilityAction actionConfig, ActorAbility instancedAbility, ActorModifier instancedModifier, BaseAbilityActor target, AbilityInvokeEntry invokeEntry)
 {
     base.AttachEffectHandler(actionConfig, instancedAbility, instancedModifier, target, null);
 }