public static BaseDoorTrap CreateTrapByType(DoorTrapType type, Mobile owner, int uses) { BaseDoorTrap trap = null; switch (type) { case DoorTrapType.Arrow: trap = new DoorArrowTrap(owner, uses); break; case DoorTrapType.Dart: trap = new DoorDartTrap(owner, uses); break; case DoorTrapType.Explosion: trap = new DoorExplosionTrap(owner); break; case DoorTrapType.Guillotine: trap = new DoorGuillotineTrap(owner); break; case DoorTrapType.Poison: trap = new DoorPoisonTrap(owner, uses); break; } return(trap); }
public static BaseDoorTrap CreateTrapByType( DoorTrapType type, Mobile owner, int uses ) { BaseDoorTrap trap = null; switch( type ) { case DoorTrapType.Arrow: trap = new DoorArrowTrap( owner, uses ); break; case DoorTrapType.Dart: trap = new DoorDartTrap( owner, uses ); break; case DoorTrapType.Explosion: trap = new DoorExplosionTrap( owner ); break; case DoorTrapType.Guillotine: trap = new DoorGuillotineTrap( owner ); break; case DoorTrapType.Poison: trap = new DoorPoisonTrap( owner, uses ); break; } return trap; }
public BaseDoorTrap(Mobile owner, DoorTrapType type, bool refillable, int uses) { _owner = owner; _type = type; _active = false; _refillable = refillable; _uses = uses; }
public BaseDoorTrap( Mobile owner, DoorTrapType type, bool refillable, int uses ) { _owner = owner; _type = type; _active = false; _refillable = refillable; _uses = uses; }
public DoorTrapInstaller(Mobile owner, DoorTrapType type, int initialUses) : base(0x1EBB) { _owner = owner; _trapType = type; _initialUses = initialUses; Name = "an installation kit for a door trap"; }
public DoorTrapInstaller( Mobile owner, DoorTrapType type, int initialUses ) : base(0x1EBB) { _owner = owner; _trapType = type; _initialUses = initialUses; Name = "an installation kit for a door trap"; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); _owner = reader.ReadMobile(); _trapType = (DoorTrapType)reader.ReadInt(); _initialUses = reader.ReadInt(); }
public BaseDoorTrap(GenericReader reader) { int version = reader.ReadInt(); _owner = reader.ReadMobile(); _type = (DoorTrapType)reader.ReadInt(); _active = reader.ReadBool(); _refillable = reader.ReadBool(); _uses = reader.ReadInt(); _door = (BaseDoor)reader.ReadItem(); }
public virtual bool AttachTrap(BaseDoorTrap trap) { if (HasTrap() || trap == null) return false; _trap = trap; _trapType = trap.TrapType; trap.Active = true; trap.Door = this; return true; }
public virtual bool AttachTrap(BaseDoorTrap trap) { if (HasTrap() || trap == null) { return(false); } _trap = trap; _trapType = trap.TrapType; trap.Active = true; trap.Door = this; return(true); }
public BaseDoorTrap( GenericReader reader ) { int version = reader.ReadInt(); _owner = reader.ReadMobile(); _type = (DoorTrapType)reader.ReadInt(); _active = reader.ReadBool(); _refillable = reader.ReadBool(); _uses = reader.ReadInt(); _door = (BaseDoor)reader.ReadItem(); }
public virtual void RemoveTrap() { _trap = null; _trapType = DoorTrapType.None; }
public override void Deserialize( GenericReader reader ) { base.Deserialize(reader); int version = reader.ReadInt(); _owner = reader.ReadMobile(); _trapType = (DoorTrapType)reader.ReadInt(); _initialUses = reader.ReadInt(); }