Example #1
0
	public void SetQuickSlot( int iIndex, int iValue, eQUICKSLOT_TYPE eType)
	{
		sQUICKSLOT _data = new sQUICKSLOT();
		_data.nValue = iValue;
		_data.eType = (int)eType;
		SetQuickSlot( iIndex, _data);
		
		#region - auto combat -
		AutoCombatManager.Instance.ItemRemovedFromQuickSlot( iIndex, iValue, eType);
		#endregion
	}
Example #2
0
	public void SetQuickSlotList( sQUICKSLOT[] slotList)
	{
		if( null == slotList)
		{
			Debug.LogError( "QuickSlot::SetQuickSlotList() [ null==sQUICKSLOT ] ");
			return;
		}

		m_QuickSlotList = slotList;
		m_bNeedUiUpdate = true;
	}
Example #3
0
	public void SetQuickSlot( int iIndex, sQUICKSLOT data)
	{
		if( null == m_QuickSlotList)
		{
			Debug.LogError( "QuickSlotContain::SetQuickSlot() [ null==m_QuickSlotList ] ");
			return;
		}

		if( m_QuickSlotList.Length <= iIndex)
		{
			Debug.LogError( "QuickSlotContain::SetQuickSlot() [ m_QuickSlotList.Length <= iIndex ] iIndex :  " + iIndex);
			return;
		}

		m_QuickSlotList[iIndex] = data;

		ResetSlot();
	}
Example #4
0
	public void SetSlots( sQUICKSLOT[] qucikSlots)
	{
		int iBeginIndex = 0;
		
		int	nItemSeq = 0;
//		foreach( AsSlot _slot in m_arraySlot )
		for(int i=0;i<m_arraySlot.Count;i++)
		{
			AsSlot _slot = m_arraySlot[i];
			SetSlotsInSlot( _slot, iBeginIndex , qucikSlots, nItemSeq++ );
		}
	}
Example #5
0
	private void SetSlotsInSlot( AsSlot _slot, int iBeginIndex, sQUICKSLOT[] qucikSlots, int i)
	{
		if( iBeginIndex+i >= qucikSlots.Length )
		{
			Debug.LogError("AsQuickSlotManager SetSlotsInSlot array index overflow![" + (iBeginIndex+i).ToString() + "]"); 
			return;
		}
		
		sQUICKSLOT _quickSlot = qucikSlots[ iBeginIndex + i];
		if( (int)eQUICKSLOT_TYPE.eQUICKSLOT_TYPE_ITEM == _quickSlot.eType)
		{
			if( _quickSlot.nValue == 0)
				_slot.SetEmpty();
			else
				_slot.SetItem( _quickSlot.nValue);
		}
		else if( (int)eQUICKSLOT_TYPE.eQUICKSLOT_TYPE_SKILL == _quickSlot.eType)
		{
			if( _quickSlot.nValue == 0)
			{
				_slot.SetEmpty();
			}
			else if( SkillBook.Instance.dicCurSkill.ContainsKey(_quickSlot.nValue) ) 
			{
				SkillView _skill = SkillBook.Instance.dicCurSkill[_quickSlot.nValue];
				_slot.SetSkill( _skill.nSkillTableIdx, _skill.nSkillLevel);
			}
		}
		else
		{
			_slot.SetEmpty();
		}
	}
Example #6
0
	public new void PacketBytesToClass( byte[] data)
	{
		Type infotype = this.GetType();
		FieldInfo headerinfo = null;

		int index = ParsePacketHeader( data);

		for( int i = 0; i < AsGameDefine.QUICK_SLOT_MAX; i++)
		{
			body[i] = new sQUICKSLOT();
			byte[] tmpData = new byte[sQUICKSLOT.size];
			Buffer.BlockCopy( data, index, tmpData, 0, tmpData.Length);
			body[i].ByteArrayToClass( tmpData);
			index += sQUICKSLOT.size;
		}
	}