public static byte[] write(int mapAssetId, int battleStationId, string battleStationName, AsteroidProgressCommand progress, AvailableModulesCommand availableModules, int buildTimeInMinutesMin, int buildTimeInMinutesMax, int buildTimeInMinutesIncrement)
        {
            var param1 = new ByteArray(ID);

            param1.writeInt(mapAssetId);
            param1.writeInt(battleStationId);
            param1.writeUTF(battleStationName);
            param1.write(progress.write());
            param1.write(availableModules.write());
            param1.writeInt(buildTimeInMinutesMin);
            param1.writeInt(buildTimeInMinutesMax);
            param1.writeInt(buildTimeInMinutesIncrement);
            return(param1.ToByteArray());
        }
Example #2
0
        public static byte[] write(int mapAssetId, int battleStationId, string battleStationName, AsteroidProgressCommand progress, AvailableModulesCommand availableModules, int buildTimeInMinutesMin, int buildTimeInMinutesMax, int buildTimeInMinutesIncrement)
        {
            var param1 = new ByteArray(ID);

            param1.write(progress.write());
            param1.writeInt(buildTimeInMinutesMax << 4 | buildTimeInMinutesMax >> 28);
            param1.writeUTF(battleStationName);
            param1.writeInt(mapAssetId << 14 | mapAssetId >> 18);
            param1.writeInt(buildTimeInMinutesMin >> 14 | buildTimeInMinutesMin << 18);
            param1.writeInt(buildTimeInMinutesIncrement << 14 | buildTimeInMinutesIncrement >> 18);
            param1.writeInt(battleStationId << 3 | battleStationId >> 29);
            param1.writeShort(-7693);
            param1.write(availableModules.write());
            return(param1.ToByteArray());
        }
        public static byte[] write(int mapAssetId, int battleStationId, string battleStationName, string clanName, FactionModule faction, BattleStationStatusCommand state, AvailableModulesCommand availableModules, int deflectorShieldMinutesMin, int deflectorShieldMinutesMax, int deflectorShieldMinutesIncrement, bool deflectorDeactivationPossible)
        {
            var param1 = new ByteArray(ID);

            param1.write(faction.write());
            param1.writeUTF(battleStationName);
            param1.writeInt(mapAssetId >> 8 | mapAssetId << 24);
            param1.writeInt(battleStationId << 5 | battleStationId >> 27);
            param1.writeInt(deflectorShieldMinutesMin >> 9 | deflectorShieldMinutesMin << 23);
            param1.writeInt(deflectorShieldMinutesMax << 10 | deflectorShieldMinutesMax >> 22);
            param1.writeShort(21318);
            param1.writeInt(deflectorShieldMinutesIncrement << 14 | deflectorShieldMinutesIncrement >> 18);
            param1.writeUTF(clanName);
            param1.write(availableModules.write());
            param1.write(state.write());
            param1.writeBoolean(deflectorDeactivationPossible);
            return(param1.ToByteArray());
        }