Пример #1
0
 public SpDropInfo(int itemId, WorldPosition worldPosition)
 {
     Item = new Item
                {
                    Position = worldPosition,
                    Count = 1,
                    ItemId = itemId,
                    //20000000
                };
 }
Пример #2
0
 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
     }
 }
Пример #3
0
        public static void AddDrop(this MapInstance instance, Item item)
        {
            instance.Items.Add(item);

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

            MapService.PickUpItem(connection.Player, item);
        }
Пример #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);
         }
     }
 }
Пример #7
0
 public SpRemoveItem(Item item)
 {
     Item = item;
 }