Ejemplo n.º 1
0
		public static void DeserializeGAME_ANSWER_MYHOUSINGITEM_LIST (byte[] bytes)
		{
			cmdGAME_ANSWER_MYHOUSINGITEM_LIST pk = new cmdGAME_ANSWER_MYHOUSINGITEM_LIST ();
			pk.Make (bytes [0], bytes [1]);
			
			if (pk.GetAck () == 0) {
				
			} else if (pk.GetAck () == 1) {
				//初始化偏移
				int ReadOffset = 2;
				
				pk.cnt = System.BitConverter.ToInt32 (bytes, ReadOffset);
				ReadOffset += sizeof(int);

				for (int i=0; (i<pk.cnt && i<100); i++) {
					pk.housingitems [i].nIid = System.BitConverter.ToInt32 (bytes, ReadOffset);
					ReadOffset += sizeof(int);

					pk.housingitems [i].nItemCode = System.BitConverter.ToInt32 (bytes, ReadOffset);
					ReadOffset += sizeof(int);

					pk.housingitems [i].ucCategory = bytes [ReadOffset];
					ReadOffset += sizeof(byte);

					pk.housingitems [i].ucIsSet = bytes [ReadOffset];
					ReadOffset += sizeof(byte);

					pk.housingitems [i].nRestMinutes = System.BitConverter.ToInt32 (bytes, ReadOffset);
					ReadOffset += sizeof(int);

					pk.housingitems [i].nPeriodic = bytes [ReadOffset];
					ReadOffset += sizeof(byte);
				}

				OnRecDta<cmdGAME_ANSWER_MYHOUSINGITEM_LIST> dlg = Singletons.GET<LobbyService> ().OnLobbyMyHousingItemList;
				if (dlg != null) {
					dlg (pk);
				}
			}
		}
Ejemplo n.º 2
0
 private void OnMyHousingItemList(cmdGAME_ANSWER_MYHOUSINGITEM_LIST d)
 {
 }