Ejemplo n.º 1
0
        public Package RespawnHandler(McpeRespawn packet, Player player)
        {
            SendNameTag(player);
            player.RemoveAllEffects();

            player.SetEffect(new Speed {Level = 1, Duration = Effect.MaxDuration}); // 10s in ticks
            //player.SetEffect(new Slowness { Level = 20, Duration = 20 * 10 });
            //player.SetEffect(new Haste { Level = 20, Duration = 20 * 10 });
            //player.SetEffect(new MiningFatigue { Level = 20, Duration = 20 * 10 });
            //player.SetEffect(new Strength { Level = 20, Duration = 20 * 10 });
            player.SetEffect(new JumpBoost {Level = 1, Duration = Effect.MaxDuration});
            //player.SetEffect(new Blindness { Level = 20, Duration = 20 * 10 });
            //player.SetAutoJump(true);

            if (player.Level.LevelId.Equals("Default"))
            {
                player.Level.CurrentWorldTime = 6000;
                player.Level.IsWorldTimeStarted = false;
            }

            player.SendSetTime();

            return packet;
        }
Ejemplo n.º 2
0
        public Package RespawnHandler(McpeRespawn packet, Player player)
        {
            player.RemoveAllEffects();

            player.SetEffect(new Speed { Level = 2, Duration = 1000 });
            ////player.SetEffect(new Slowness {Level = 2, Duration = 20});
            //player.SetEffect(new JumpBoost { Level = 2, Duration = Effect.MaxDuration });
            //player.SetAutoJump(true);

            if (player.Level.LevelId.Equals("Default"))
            {
                player.Level.CurrentWorldTime = 6000;
                player.Level.IsWorldTimeStarted = false;
            }

            player.SendSetTime();

            return packet;
        }
Ejemplo n.º 3
0
        public Package RespawnHandler(McpeRespawn packet, Player player)
        {
            McpeMobEffect speedEffect = McpeMobEffect.CreateObject();
            speedEffect.entityId = 0;
            speedEffect.eventId = 1;
            speedEffect.effectId = 1;
            speedEffect.duration = 0x7fffffff;
            speedEffect.amplifier = 2;
            speedEffect.particles = 1;
            player.SendPackage(speedEffect);

            McpeMobEffect jumpEffect = McpeMobEffect.CreateObject();
            jumpEffect.entityId = 0;
            jumpEffect.eventId = 1;
            jumpEffect.effectId = 8;
            jumpEffect.duration = 0x7fffffff;
            jumpEffect.amplifier = 2;
            jumpEffect.particles = 1;
            player.SendPackage(jumpEffect);

            if (player.Level.LevelId.Equals("Default"))
            {
                player.Level.CurrentWorldTime = 10000;
                player.Level.IsWorldTimeStarted = false;
            }

            player.SendSetTime();

            return packet;
        }