Ejemplo n.º 1
0
        public override void DoAction(IEventArgs args)
        {
            bool rw = FreeUtil.ReplaceBool(resetWeapon, args);
            bool rp = FreeUtil.ReplaceBool(resetPosition, args);

            PlayerEntity p = GetPlayerEntity(args);

            if (p != null)
            {
                CalculateDeadTime(p);
                p.gamePlay.LifeState = (int)EPlayerLifeState.Alive;
                p.gamePlay.CurHp     = p.gamePlay.MaxHp;
                p.isFlagCompensation = true;
                p.gamePlay.CurArmor  = p.gamePlay.MaxArmor;
                p.gamePlay.CurHelmet = p.gamePlay.MaxHelmet;
                //p.stateInterface.State.PlayerReborn();
                p.position.InterpolateType = (int)PositionInterpolateMode.Discrete;
                p.position.ServerTime      = args.GameContext.session.currentTimeObject.CurrentTime;
                p.gamePlay.InHurtedCount   = 0;
                p.statisticsData.Statistics.EvenKillCount = 0;
                if (FreeUtil.ReplaceBool(resetWeapon, args))
                {
                    p.ModeController().RecoverPlayerWeapon(p);
                }
                PlayerAnimationAction.DoAnimation(args.GameContext, PlayerAnimationAction.PlayerReborn, p);
            }
        }
Ejemplo n.º 2
0
        public override void DoAction(IEventArgs args)
        {
            PlayerEntity player = GetPlayerEntity(args);

            if (player != null)
            {
                CalculateDeadTime(player, args);
                player.gamePlay.LifeState      = (int)EPlayerLifeState.Alive;
                player.gamePlay.IsStandPosture = true;
                player.gamePlay.CurHp          = player.gamePlay.MaxHp;
                player.isFlagCompensation      = true;
                player.oxygenEnergyInterface.Oxygen.ResetOxygen(true);
                player.position.InterpolateType = (int)PositionInterpolateMode.Discrete;
                player.position.ServerTime      = args.GameContext.session.currentTimeObject.CurrentTime;
                player.gamePlay.InHurtedCount   = 0;
                player.statisticsData.Statistics.EvenKillCount = 0;
                player.WeaponController().RelatedThrowAction.ThrowingEntityKey = new EntityKey(0, (short)EEntityType.End);
                player.WeaponController().RelatedThrowAction.LastFireWeaponKey = -1;
                PlayerAnimationAction.DoAnimation(args.GameContext, PlayerAnimationAction.PlayerReborn, player);
                if (FreeUtil.ReplaceBool(resetWeapon, args))
                {
                    player.ModeController().RecoverPlayerWeapon(player, player.WeaponController().HeldBagPointer);
                }
            }
        }