Exemple #1
0
 private static void Mine(YiObj player, ref MsgAction packet)
 {
     player.Mining = true;
     ScreenSystem.Send(player, packet, true);
 }
Exemple #2
0
 private static void DoEmote(YiObj player, ref MsgAction packet)
 {
     player.Emote = (Emote)packet.X;
     ScreenSystem.Send(player, packet, true);
 }
Exemple #3
0
        private static void MapShow(Player player, ref MsgAction packet)
        {
            player.ForceSend(MapShowPacket(player), (ushort)sizeof(MsgAction));
            player.ForceSend(MsgStatus.Create(player.MapId, 0), (ushort)sizeof(MsgStatus));

            if (player.Inventory.Items == null)
            {
                player.Inventory = new Inventory(player);
            }
            else
            {
                player.Inventory.SetOwner(player);
            }
            if (player.Equipment.Items == null)
            {
                player.Equipment = new Equipment(player);
            }
            else
            {
                player.Equipment.SetOwner(player);
            }
            foreach (var kvp in player.Equipment)
            {
                player.Send(new MsgItemInformation(kvp.Value, kvp.Key));
            }

            foreach (var kvp in player.Inventory)
            {
                player.Send(new MsgItemInformation(kvp.Value, MsgItemPosition.Inventory));
            }

            foreach (var kvp in player.Profs)
            {
                player.Send(MsgProf.Create(kvp.Value));
            }

            foreach (var kvp in player.Skills)
            {
                player.Send(MsgSkill.Create(kvp.Value));
            }

            EntityLogic.Recalculate(player);

            if (player.Online)
            {
                return;
            }
            player.AddStatusEffect(StatusEffect.Frozen);
            player.CurrentNpcId = 1337;
            player.Send(LegacyPackets.NpcSay("Select Char."));
            player.Send(LegacyPackets.NpcLink("Next", 1));
            player.Send(LegacyPackets.NpcLink("Select", 10));
            player.Send(LegacyPackets.NpcLink("New", 100));
            player.Send(LegacyPackets.NpcFace(10));
            player.Send(LegacyPackets.NpcFinish());

            ScreenSystem.Create(player);
            ScreenSystem.Update(player);

            ScreenSystem.Send(player, Create(player, player.UniqueId, MsgActionType.SpawnEffect), true);
        }
Exemple #4
0
 private static void ChangePkMode(Player player, ref MsgAction packet)
 {
     player.PkMode = (PkMode)packet.Param;
     player.Send(packet);
 }
Exemple #5
0
 private static void ChangeDirection(YiObj player, ref MsgAction packet)
 {
     player.Direction = (Direction)packet.Direction;
     ScreenSystem.Send(player, packet, true);
 }
Exemple #6
0
 private static void EndFly(Player player, ref MsgAction packet)
 {
     player.RemoveStatusEffect(StatusEffect.Flying);
     player.Send(packet);
 }
Exemple #7
0
 private static void EndTransform(Player player, ref MsgAction packet)
 {
     player.DelTransform();
     EntityLogic.Recalculate(player);
     player.Send(packet);
 }
Exemple #8
0
 private static void DropMagic(Player s, ref MsgAction packet)
 {
     Output.WriteLine("IT IS CALLING IT");
     s.Skills.Remove((SkillId)packet.Param);
     s.Send(packet);
 }