Example #1
0
	protected AsSynthesisSlot AddSynthesisSlot(UIInvenSlot _invenSlot , eSynthesisSlotType _type , int _seq = 0 )
	{
		AsSynthesisSlot	synthesisSlot = new AsSynthesisSlot();
		synthesisSlot.invenSlot 		= _invenSlot;
		synthesisSlot.slotType 		= _type;
		synthesisSlot.slotTypeSeq = _seq;

		listSynthesisSlot.Add (synthesisSlot);

		return synthesisSlot;
	}
Example #2
0
	public override void GuiInputDClickUp(Ray inputRay)
	{
		if (isProcessing == true)
			return;

		if( false == m_bInputDown )
			return;
		
		base.GuiInputDClickUp(inputRay);	

		foreach (AsSynthesisSlot	_synSlot in listSynthesisSlot) 
		{
			UIInvenSlot		_invenSlot = _synSlot.invenSlot;
			if( _invenSlot != null && _invenSlot.IsIntersect( inputRay ) == true )
			{
				if( _invenSlot.slotItem != null )
					ResetSlotMoveLock(_invenSlot.slotItem.realItem.getSlot , false);

				_invenSlot.DeleteSlotItem();

				if( _synSlot.slotType == eSynthesisSlotType.Target )
				{
					targetItemName.Text = string.Empty;
					targetSynthesisSlot = null;

					CancelMaterialItem();
					UpdateItemChangeInfo();
				}
				else
				{
					UpdateItemChangeInfo();
					ReRangeMaterial();
				}

				return;
			}
		}
	}
Example #3
0
	private void TargetSynthesisSlotResetting(int _targetSlot)
	{
		if (targetSynthesisSlot != null && targetSynthesisSlot.invenSlot.slotItem != null) 
		{
			ResetSlotMoveLock( targetSynthesisSlot.invenSlot.slotItem.realItem.getSlot , false);
			targetSynthesisSlot.invenSlot.DeleteSlotItem();
			
			targetItemName.Text = string.Empty;
			targetSynthesisSlot = null;
		}
		
		//	result target item set
		InvenSlot[]	slots = ItemMgr.HadItemManagement.Inven.invenSlots;
		if (_targetSlot < slots.Length) 
		{
			InvenSlot	_invenSlot = slots[_targetSlot];

			if( _invenSlot.realItem.item.ItemData.grade < Item.eGRADE.Ark )
			{
				SetDClickRealItem( _invenSlot.realItem );
				ResetSlotMoveLock( _targetSlot , true);
			}
			else
			{
				UpdateItemChangeInfo();
			}
		}
	}
Example #4
0
	protected int IsCheckItemType( AsSynthesisSlot _synSlot , RealItem _realItem )
	{
		if (Item.eITEM_TYPE.CosEquipItem != _realItem.item.ItemData.GetItemType ()) 
		{
			if (_synSlot.slotType == eSynthesisSlotType.Target) 
				return 2408;
			else if (_synSlot.slotType == eSynthesisSlotType.RawMaterial) 
				return 2412;
		}
		
		if (Item.eUSE_TIME_TYPE.NONE != _realItem.item.ItemData.m_eUseTimeType) 
		{
			if (_synSlot.slotType == eSynthesisSlotType.Target) 
				return 2410;
			else if (_synSlot.slotType == eSynthesisSlotType.RawMaterial) 
				return 2413;
		}

		if( IsSameRealItem( _realItem ) )
		{
			return 101;
		}
		
		if( false == _realItem.item.ItemData.m_Item_MixEnchant )
		{
			return 2411;
		}

		if (_synSlot.slotType == eSynthesisSlotType.Target) 
		{
			if (_realItem.item.ItemData.grade == Item.eGRADE.Normal || _realItem.item.ItemData.grade == Item.eGRADE.Ark)
				return 2409;
		}

		return 0;
	}
Example #5
0
	public override bool SetDClickRealItem( RealItem _realItem )
	{
		if (isProcessing == true)
			return false;

		if( true == isMsgBox)
			return false;
		
		if( null == _realItem )
			return false;
		
		if( actionSlider != null && false == actionSlider.isStop )
			return false;
			
		if( true == AsCommonSender.isSendItemMix )
			return false;

		int _checkResult = 2417;
		foreach (AsSynthesisSlot	_synSlot in listSynthesisSlot) 
		{
			UIInvenSlot		_invenSlot = _synSlot.invenSlot;

			_checkResult = IsCheckItemType( _synSlot , _realItem );
			if( _checkResult == 0 )
			{
				if( _invenSlot != null && _invenSlot.slotItem == null )
				{
					if( _synSlot.slotType == eSynthesisSlotType.RawMaterial && synthesisMode == eSynthesisMode.Upgrade )
					{
						AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2417), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
						return false;
					}

					if( _synSlot.slotType == eSynthesisSlotType.RawMaterial && targetSynthesisSlot == null )
					{
						AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2426) , AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
						return false;
					}

					if( _synSlot.slotType == eSynthesisSlotType.RawMaterial && IsNowExpectExpMax() == true )
					{
						AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2424) , AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
						return false;
					}

					SetItemInSlot( _invenSlot, _realItem );
					if( null != _invenSlot.slotItem )
					{
						if( _synSlot.slotType == eSynthesisSlotType.Target )
						{
							_invenSlot.slotItem.iconImg.SetSize( m_iconSize, m_iconSize );			
							SetTargetItemName( _realItem );
							targetSynthesisSlot = _synSlot;
						}
						else if( _synSlot.slotType == eSynthesisSlotType.RawMaterial )
						{

						}
					}
					UpdateItemChangeInfo();

					return true;
				}
			}
		}

		if(  _checkResult == 0 )
			_checkResult = 2417;

		//	fail
		AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(_checkResult), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);

		return false;
	}
Example #6
0
	public override bool SetInputUpRealItem( RealItem _realItem, Ray inputRay )
	{
		if (isProcessing == true)
			return false;

		if( true == isMsgBox)
			return false;
		
		if( null == _realItem )
			return false;
		
		if( actionSlider != null && false == actionSlider.isStop )
			return false;
			
		if( true == AsCommonSender.isSendItemMix )
			return false;

		bool isSynSlotChange = false;

		foreach (AsSynthesisSlot	_synSlot in listSynthesisSlot) 
		{
			UIInvenSlot		_invenSlot = _synSlot.invenSlot;

			if( _invenSlot == null )
				continue;

			if( synthesisMode == eSynthesisMode.Upgrade && _synSlot.slotType == eSynthesisSlotType.RawMaterial )
			{
				AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2417), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
				return false;
			}

			if( _invenSlot.IsIntersect( inputRay ) == true )
			{
				int _checkResult = IsCheckItemType( _synSlot , _realItem );
				if( _checkResult != 0 )
				{
					AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(_checkResult), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
					return false;
				}

				if( _synSlot.slotType == eSynthesisSlotType.RawMaterial && targetSynthesisSlot == null )
				{
					AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2426) , AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
					return false;
				}

				if( _synSlot.slotType == eSynthesisSlotType.RawMaterial && IsNowExpectExpMax() == true )
				{
					AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(2424) , AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE);
					return false;
				}

				if( _invenSlot.slotItem != null )
				{
					ResetSlotMoveLock(_invenSlot.slotItem.realItem.getSlot , false);
					isSynSlotChange = true;
				}

				AsSynthesisSlot	_realActionSlot = _synSlot;

				if( isSynSlotChange == false && _realActionSlot.slotType == eSynthesisSlotType.RawMaterial )
				{
					_realActionSlot = GetEmptyMaterialSlot();
					_invenSlot = _realActionSlot.invenSlot;
				}
				
				SetItemInSlot( _invenSlot, _realItem );
				if( null != _invenSlot.slotItem && _realActionSlot.slotType == eSynthesisSlotType.Target )
				{
					_invenSlot.slotItem.iconImg.SetSize( m_iconSize, m_iconSize );			
					SetTargetItemName( _realItem );
					targetSynthesisSlot = _realActionSlot;
				}

				AsSoundManager.Instance.PlaySound( _realItem.item.ItemData.getStrDropSound, Vector3.zero, false);
				UpdateItemChangeInfo();

				return true;
			}
		}
		return false;
	}