示例#1
0
 public bool UnlockDoor(BaseGameItem item = null)
 {
     if (item != null)
     {
         if (item == this.SpecificKey ||
             item.GameID == KeyGraphicID)
         {
             // We got unlocked.
             this.IsLocked = false;
             this.LookAt   = "A Unlocked door, it could lead anywhere.";
             return(true);
         }
     }
     return(false);
 }
示例#2
0
        public static Container CastFromBaseGameItem(BaseGameItem item)
        {
            Container c = new Container();

            c.ContainedItems = item.ContainedItems;
            c.Enchantments   = item.Enchantments;
            c.Equipped       = item.Equipped;
            c.GameID         = item.GameID;
            c.GraphicID      = item.GraphicID;
            c.IsContainer    = true;
            c.Color          = item.Color;
            c.Name           = item.Name;
            c.Location       = item.Location;
            c.LookAt         = item.LookAt;
            c.SqlID          = item.SqlID;
            c.Type           = item.Type;
            return(c);
        }
示例#3
0
 public void LockDoor(BaseGameItem key = null)
 {
     if (key != null)
     {
         this.SpecificKey = key;
         this.IsPickable  = true;
         this.IsLocked    = true;
         this.IsOpen      = false;
         this.LookAt      = "A Locked door, the keyhole looks to have been used fairly recently.";
     }
     else
     {
         // A door that cannot be opened
         this.IsPickable  = false;
         this.IsOpen      = false;
         this.SpecificKey = null;
         this.IsLocked    = true;
         this.LookAt      = "A Locked door, the keyhole seems to be filled in with clay.";
     }
 }