Exemple #1
0
        public EActResults Open(Creature _creature, LiveMapCell _liveMapCell)
        {
            if (ELockType != ELockType.OPEN)
            {
                MessageManager.SendXMessage(this, new XMessage(EALTurnMessage.CREATURE_OPENS_IT, _creature, this));
                ELockType = ELockType.OPEN;

                var collection = GetItems(_creature);
                if (collection.Any)
                {
                    //обязать по любасу показать диалог выбора предметов
                    _creature.AddActToPool(new TakeAct(), true, collection.Items, _liveMapCell.LiveCoords);
                }
                else
                {
                    MessageManager.SendXMessage(this, new XMessage(EALTurnMessage.CONTAINER_IS_EMPTY, _creature, this));
                }

                return(EActResults.DONE);
            }
            throw new NotImplementedException();
        }
Exemple #2
0
		public EActResults Open(Creature _creature, LiveMapCell _liveMapCell)
		{
			if (ELockType != ELockType.OPEN)
			{
				MessageManager.SendXMessage(this, new XMessage(EALTurnMessage.CREATURE_OPENS_IT, _creature, this));
				ELockType = ELockType.OPEN;

				var collection = GetItems(_creature);
				if (collection.Any)
				{
					//обязать по любасу показать диалог выбора предметов
					_creature.AddActToPool(new TakeAct(), true, collection.Items, _liveMapCell.LiveCoords);
				}
				else
				{
					MessageManager.SendXMessage(this, new XMessage(EALTurnMessage.CONTAINER_IS_EMPTY, _creature, this));
				}

				return EActResults.DONE;
			}
			throw new NotImplementedException();
		}
Exemple #3
0
 internal void SetLockType(ELockType _eLockType)
 {
     m_eLockType = _eLockType;
 }
Exemple #4
0
		internal void SetLockType(ELockType _eLockType) { m_eLockType = _eLockType; }