Exemplo n.º 1
0
 private void OnHoldingChange(HoldingChangePacket p)
 {
     if (HoldingChange != null) HoldingChange.Invoke(this, new PacketEventArgs<HoldingChangePacket>(p));
 }
Exemplo n.º 2
0
        public static void ReadHoldingChange(Client client, PacketReader reader)
        {
            HoldingChangePacket hc = new HoldingChangePacket();
            hc.Read(reader);

            if (!reader.Failed)
                Client.HandlePacketHoldingChange(client, hc);
        }
Exemplo n.º 3
0
        public static void HandlePacketHoldingChange(Client client, HoldingChangePacket packet)
        {
            client.Owner.Inventory.OnActiveChanged((short)(packet.Slot += 36));

            foreach (Client c in client.Owner.Server.GetNearbyPlayers(client.Owner.World, client.Owner.Position.X, client.Owner.Position.Y, client.Owner.Position.Z).Where(c => c != client))
            {
                c.SendHoldingEquipment(client);
            }
        }
Exemplo n.º 4
0
        public static void HandlePacketHoldingChange(Client client, HoldingChangePacket packet)
        {
            client.Owner.Inventory.OnActiveChanged((packet.Slot += 36));

            foreach (Client c in client.Owner.Server.GetNearbyPlayersInternal(client.Owner.World, UniversalCoords.FromAbsWorld(client.Owner.Position)).Where(c => c != client))
            {
                c.SendHoldingEquipment(client);
            }
        }