示例#1
0
        public static void ReadAnimation(Client client, PacketReader reader)
        {
            AnimationPacket ap = new AnimationPacket();
            ap.Read(reader);

            if(!reader.Failed)
                Client.HandlePacketAnimation(client, ap);
        }
示例#2
0
 private void OnAnimation(AnimationPacket p)
 {
     if (Animation != null) Animation.Invoke(this, new PacketEventArgs<AnimationPacket>(p));
 }
示例#3
0
 public static void HandlePacketAnimation(Client client, AnimationPacket packet)
 {
     Player p = client.Owner;
     foreach (Client c in p.Server.GetNearbyPlayers(p.World, p.Position.X, p.Position.Y, p.Position.Z))
     {
         if (c == client)
             continue;
         c.SendPacket(new AnimationPacket
         {
             Animation = packet.Animation,
             PlayerId = p.EntityId
         });
     }
 }
示例#4
0
 public static void ReadAnimation(TestClient client, PacketReader reader)
 {
     AnimationPacket ap = new AnimationPacket();
     ap.Read(reader);
 }
示例#5
0
        public static void HandlePacketAnimation(Client client, AnimationPacket packet)
        {
            Player p = client.Owner;

            UniversalCoords coords = UniversalCoords.FromAbsWorld(p.Position);
            foreach (Client c in p.Server.GetNearbyPlayersInternal(p.World, coords))
            {
                if (c == client)
                    continue;
                c.SendPacket(new AnimationPacket
                {
                    Animation = packet.Animation,
                    PlayerId = p.EntityId
                });
            }
        }