Beispiel #1
0
	public void ChangeElement(body_SC_PET_SLOT_CHANGE _change)
	{
		m_PetTableIdx = _change.nPetTableIdx;
		m_PetSlot = _change.nPetSlot;
		m_PetName = AsUtil.GetRealString( System.Text.UTF8Encoding.UTF8.GetString(_change.szPetName));
		m_Level = _change.nLevel;

		if(m_PetTableIdx > 0)
			m_PetRecord = AsTableManager.Instance.GetPetRecord(m_PetTableIdx);
	}
Beispiel #2
0
	public void Recv_PetSlotChange(byte[] _packet)
	{
		body_SC_PET_SLOT_CHANGE slot = new body_SC_PET_SLOT_CHANGE();
		slot.PacketBytesToClass( _packet);

		Debug.Log("AsPetManager:: Recv_PetSlotChange: slot.PetTableIdx = " + slot.nPetTableIdx + ", slot.PetSlot = " + slot.nPetSlot);

		if(m_dicPetList.ContainsKey(slot.nPetSlot) == true)
		{
			PetListElement element = m_dicPetList[slot.nPetSlot];
			element.ChangeElement(slot);

			if(element.PetTableIdx == 0)
			{
				m_listPetList.Remove(element);
				m_dicPetList.Remove(element.PetSlot);
			}
		}
		else 
		{
			PetListElement element = new PetListElement(slot);
			m_listPetList.Add(element);
			m_dicPetList.Add(slot.nPetSlot, element);
		}

		m_listPetList.Sort(Dlt_SortPetList);
		if(m_PetManageDlg != null)
			m_PetManageDlg.Open();
	}
Beispiel #3
0
	public PetListElement(body_SC_PET_SLOT_CHANGE _change)
	{
		ChangeElement(_change);
	}