Exemple #1
0
 public SpDropInfo(int itemId, WorldPosition worldPosition)
 {
     Item = new Item
                {
                    Position = worldPosition,
                    Count = 1,
                    ItemId = itemId,
                    //20000000
                };
 }
 public static void RemoveItem(this MapInstance instance, Item item)
 {
     try
     {
         instance.Items.Remove(item);
         Global.VisibleService.Send(item, new SpRemoveItem(item));
         item.Release();
     }
     // ReSharper disable EmptyGeneralCatchClause
     catch
     // ReSharper restore EmptyGeneralCatchClause
     {
         //Already removed
     }
 }
        public static void AddDrop(this MapInstance instance, Item item)
        {
            instance.Items.Add(item);

            new DelayedAction(() => instance.RemoveItem(item), 60000);
        }
Exemple #4
0
 public SpDropInfo(Item item)
 {
     Item = item;
 }
Exemple #5
0
        public static void PickUpItem(IConnection connection, Item item)
        {
            if (connection.Player == null)
                return;

            MapService.PickUpItem(connection.Player, item);
        }
Exemple #6
0
 private void CheckItem(Item item)
 {
     if (IsVisible(Player, item))
     {
         if (!Player.VisibleItems.Contains(item))
         {
             Player.VisibleItems.Add(item);
             item.VisiblePlayers.Add(Player);
             PlayerLogic.InTheVision(Player, item);
         }
     }
     else
     {
         if (Player.VisibleItems.Contains(item))
         {
             Player.VisibleItems.Remove(item);
             if (item.VisiblePlayers != null)
                 item.VisiblePlayers.Remove(Player);
             PlayerLogic.OutOfVision(Player, item);
         }
     }
 }
Exemple #7
0
 public SpRemoveItem(Item item)
 {
     Item = item;
 }