Exemple #1
0
        public static byte[] write(AssetTypeModule type, String userName, int factionId, String clanTag, int assetId, int designId,
                                   int expansionStage, int posX, int posY, int clanId, bool invisible, bool visibleOnWarnRadar,
                                   bool detectedByWarnRadar, ClanRelationModule clanRelation,
                                   List <VisualModifierCommand> modifier)
        {
            ByteArray param1 = new ByteArray(ID);

            param1.write(type.write());
            param1.writeUTF(userName);
            param1.writeInt(factionId);
            param1.writeUTF(clanTag);
            param1.writeInt(assetId);
            param1.writeInt(designId);
            param1.writeInt(expansionStage);
            param1.writeInt(posX);
            param1.writeInt(posY);
            param1.writeInt(clanId);
            param1.writeBoolean(invisible);
            param1.writeBoolean(visibleOnWarnRadar);
            param1.writeBoolean(detectedByWarnRadar);
            param1.write(clanRelation.write());
            param1.writeInt(modifier.Count);
            foreach (var _loc2_ in modifier)
            {
                param1.write(_loc2_.write());
            }
            return(param1.ToByteArray());
        }
Exemple #2
0
        public static byte[] write(AssetTypeModule type, String name, int factionId, String clanTag, int assetId, int designId,
                                   int expansionStage, int x, int y, int clanId, bool invisible, bool visibleOnWarnRadar,
                                   bool detectedByWarnRadar, bool showBubble, ClanRelationModule clanRelation,
                                   List <VisualModifierCommand> modifier)
        {
            ByteArray param1 = new ByteArray(ID);

            param1.writeInt(x >> 10 | x << 22);
            param1.writeInt(y >> 1 | y << 31);
            param1.writeUTF(name);
            param1.writeInt(modifier.Count);
            foreach (var m in modifier)
            {
                param1.write(m.write());
            }
            param1.writeBoolean(showBubble);
            param1.writeInt(expansionStage << 15 | expansionStage >> 17);
            param1.writeInt(designId << 16 | designId >> 16);
            param1.writeBoolean(invisible);
            param1.writeInt(factionId >> 3 | factionId << 29);
            param1.writeBoolean(visibleOnWarnRadar);
            param1.writeShort(24441);
            param1.write(clanRelation.write());
            param1.writeUTF(clanTag);
            param1.write(type.write());
            param1.writeInt(clanId >> 10 | clanId << 22);
            param1.writeBoolean(detectedByWarnRadar);
            param1.writeInt(assetId >> 5 | assetId << 27);
            return(param1.ToByteArray());
        }
Exemple #3
0
        public static byte[] write(AssetTypeModule assetType, int uid)
        {
            var param1 = new ByteArray(ID);

            param1.write(assetType.write());
            param1.writeShort(-17782);
            param1.writeInt(uid << 15 | uid >> 17);
            return(param1.ToByteArray());
        }
Exemple #4
0
        public static byte[] write(int assetId, AssetTypeModule type, int designId, int expansionStage, int hitpoints, int maxHitpoints, bool shielded, int shieldEnergy, int maxShieldEnergy)
        {
            var param1 = new ByteArray(ID);

            param1.writeInt(hitpoints << 5 | hitpoints >> 27);
            param1.writeInt(designId >> 8 | designId << 24);
            param1.writeInt(assetId >> 6 | assetId << 26);
            param1.writeInt(expansionStage >> 15 | expansionStage << 17);
            param1.writeInt(shieldEnergy << 15 | shieldEnergy >> 17);
            param1.writeInt(maxHitpoints << 15 | maxHitpoints >> 17);
            param1.writeShort(14279);
            param1.write(type.write());
            param1.writeBoolean(shielded);
            param1.writeInt(maxShieldEnergy << 12 | maxShieldEnergy >> 20);
            return(param1.ToByteArray());
        }