public static void ReadAnimation(Client client, PacketReader reader) { AnimationPacket ap = new AnimationPacket(); ap.Read(reader); if(!reader.Failed) Client.HandlePacketAnimation(client, ap); }
private void OnAnimation(AnimationPacket p) { if (Animation != null) Animation.Invoke(this, new PacketEventArgs<AnimationPacket>(p)); }
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 }); } }
public static void ReadAnimation(TestClient client, PacketReader reader) { AnimationPacket ap = new AnimationPacket(); ap.Read(reader); }
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 }); } }