예제 #1
0
        public static void ReportStatus(VillageState status, ByteArray byteArray)
        {
            byteArray.Reset();
            byteArray.WriteHeader();

            byteArray.writeInt(EnumVillageReportMethods.CLIENT_REPORTSTATUS_HASH);
            byteArray.EncryptKey = EnumVillageReportMethods.CLIENT_REPORTSTATUS_HASH;
            byteArray.CRC        = 0;
            byteArray.writeDynamicsInt(ByteArray.globalSeq);
            status.WriteToByteArray(byteArray);
            ++ByteArray.globalSeq;
            byteArray.writeIntNCRC(byteArray.CRC);
            byteArray.EncryptKey = 0;
        }
예제 #2
0
        public static ByteArray ReportStatus(VillageState status)
        {
            ByteArray byteArray = new ByteArray();

            byteArray.writeInt(EnumVillageReportMethods.CLIENT_REPORTSTATUS_HASH);
            byteArray.EncryptKey = EnumVillageReportMethods.CLIENT_REPORTSTATUS_HASH;
            byteArray.CRC        = 0;
            byteArray.writeDynamicsInt(ByteArray.globalSeq);
            status.WriteToByteArray(byteArray);

            ++ByteArray.globalSeq;
            byteArray.writeInt(byteArray.CRC);
            byteArray.EncryptKey = 0;
            return(byteArray);
        }