private void ProcessDeleteMessage(ObjectDeleteMessage <SimpleDemoModel> objectToDelete)
 {
     if (Shapes.Contains(objectToDelete.Model))
     {
         Shapes.Remove(objectToDelete.Model);
     }
 }
        public static void HandleObjectDeleteMessage(WorldClient client, ObjectDeleteMessage message)
        {
            BasePlayerItem basePlayerItem = client.Character.Inventory.TryGetItem((int)message.objectUID);

            if (basePlayerItem != null)
            {
                client.Character.Inventory.RemoveItem(basePlayerItem, (uint)message.quantity, true);
            }
        }
Exemplo n.º 3
0
 public void DeleteItem(int uid, int quantity)
 {
     if (ItemExists(uid) && ItemQuantity(uid) > 0)
     {
         ObjectDeleteMessage msg = new ObjectDeleteMessage(uid, quantity);
         Account.SocketManager.Send(msg);
         Account.Log(new ActionTextInformation("Suppression de " + GetItemFromUID(uid).Name + "(x" + quantity + ")."), 2);
     }
 }
Exemplo n.º 4
0
        public static void HandleObjectDeleteMessage(WorldClient client, ObjectDeleteMessage message)
        {
            var item = client.Character.Inventory.TryGetItem(message.objectUID);

            if (item == null)
            {
                return;
            }

            client.Character.Inventory.RemoveItem(item, message.quantity);
        }
        public static void HandeObjectDeleteMessage(ObjectDeleteMessage message, WorldClient client)
        {
            if (!client.Character.Busy && !client.Character.Fighting)
            {
                CharacterItemRecord item = client.Character.Inventory.GetItem(message.objectUID);

                if (item != null)
                {
                    client.Character.Inventory.RemoveItem(item, message.quantity);

                    if (item.IsValidMountCertificate)
                    {
                        CertificateProvider.Instance.OnCertificateDestroyed(client.Character, item);
                    }
                }
            }
        }
Exemplo n.º 6
0
 public static void HandleObjectDelete(ObjectDeleteMessage message, WorldClient client)
 {
     client.Character.Inventory.RemoveItem(message.objectUID, message.quantity);
 }