Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.37 KB | None | 0 0
  1. using System;
  2. using Server.Network;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. namespace Server.Items
  6. {
  7.     public class LootBox : Container
  8.     {
  9.  
  10.  
  11.  
  12.         public LootBox(Serial serial)
  13.             : base(serial)
  14.         {
  15.         }
  16.  
  17.    
  18.  
  19.  
  20.         public override void Serialize(GenericWriter writer)
  21.         {
  22.             base.Serialize(writer);
  23.  
  24.             writer.Write((int)0); // version
  25.         }
  26.  
  27.         public override void Deserialize(GenericReader reader)
  28.         {
  29.             base.Deserialize(reader);
  30.  
  31.             int version = reader.ReadInt();
  32.  
  33.             switch (version)
  34.             {
  35.                 case 0:
  36.                     {
  37.  
  38.                         break;
  39.                     }
  40.             }
  41.  
  42.         }
  43.  
  44.         private static bool m_SendRemovePacket;
  45.  
  46.         public static bool SendDeleteOnClose { get { return m_SendRemovePacket; } set { m_SendRemovePacket = value; } }
  47.  
  48.  
  49.  
  50.         public override void OnSingleClick(Mobile from)
  51.         {
  52.         }
  53.  
  54.         public override void OnDoubleClick(Mobile from)
  55.         {
  56.         }
  57.  
  58.         public override DeathMoveResult OnParentDeath(Mobile parent)
  59.         {
  60.             return DeathMoveResult.RemainEquiped;
  61.         }
  62.  
  63.         public override bool IsPublicContainer { get { return true; } }
  64.  
  65.         [Constructable]
  66.         public LootBox()
  67.             : base(0xE75)
  68.         {
  69.             Layer = Layer.Bank;
  70.             Movable = false;
  71.         }
  72.  
  73.         public override void DisplayTo(Mobile to)
  74.         {
  75.             to.Send(new ContainerDisplay(this));
  76.             to.Send(new ContainerContent(to, this));
  77.  
  78.             if (ObjectPropertyList.Enabled)
  79.             {
  80.                 List<Item> items = this.Items;
  81.  
  82.                 for (int i = 0; i < items.Count; ++i)
  83.                     to.Send(items[i].OPLPacket);
  84.             }
  85.         }
  86.         public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
  87.         {
  88.             return true;
  89.         }
  90.  
  91.         public override bool IsAccessibleTo(Mobile m)
  92.         {
  93.             return true;
  94.         }
  95.  
  96.         public override bool OnDragDrop(Mobile from, Item dropped)
  97.         {
  98.             return true;
  99.         }
  100.  
  101.         public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
  102.         {
  103.             return false;
  104.         }
  105.     }
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement