Exemplo n.º 1
0
        public static byte[] write(int userId, string shipType, int expansionStage, string clanTag, string userName, int x, int y, int factionId, int clanId, int dailyRank, bool warnBox, ClanRelationModule clanDiplomacy, int galaxyGatesDone, bool useSystemFont, bool npc, bool cloaked, int motherShipId, int positionIndex, List <VisualModifierCommand> modifier, class_11d var11d)
        {
            var param1 = new ByteArray(ID);

            param1.writeUTF(userName);
            param1.writeInt(galaxyGatesDone >> 13 | galaxyGatesDone << 19);
            param1.writeBoolean(useSystemFont);
            param1.writeInt(factionId >> 7 | factionId << 25);
            param1.writeInt(expansionStage << 6 | expansionStage >> 26);
            param1.writeUTF(shipType);
            param1.writeInt(dailyRank >> 4 | dailyRank << 28);
            param1.writeBoolean(npc);
            param1.writeInt(clanId << 3 | clanId >> 29);
            param1.write(clanDiplomacy.write());
            param1.writeBoolean(warnBox);
            param1.writeInt(motherShipId >> 16 | motherShipId << 16);
            param1.writeUTF(clanTag);
            param1.writeInt(modifier.Count);
            foreach (var m in modifier)
            {
                param1.write(m.write());
            }
            param1.writeBoolean(cloaked);
            param1.writeInt(userId >> 14 | userId << 18);
            param1.writeInt(positionIndex << 3 | positionIndex >> 29);
            param1.writeInt(x << 4 | x >> 28);
            param1.write(var11d.write());
            param1.writeInt(y << 9 | y >> 23);
            return(param1.ToByteArray());
        }
        public static byte[] write(int ownerId, int petId, short petDesignId, short expansionStage, string petName, short petFactionId, int petClanId, short petLevel, string clanTag, ClanRelationModule clanRelationship, int x, int y, int petSpeed, bool isInIdleMode, bool isVisible, class_11d varzL)
        {
            var param1 = new ByteArray(ID);

            param1.write(clanRelationship.write());
            param1.writeShort(petDesignId);
            param1.write(varzL.write());
            param1.writeShort(expansionStage);
            param1.writeInt(petSpeed >> 5 | petSpeed << 27);
            param1.writeUTF(petName);
            param1.writeInt(x << 5 | x >> 27);
            param1.writeBoolean(isInIdleMode);
            param1.writeShort(-20860);
            param1.writeInt(petClanId << 2 | petClanId >> 30);
            param1.writeInt(y >> 15 | y << 17);
            param1.writeInt(petId >> 7 | petId << 25);
            param1.writeInt(ownerId >> 16 | ownerId << 16);
            param1.writeBoolean(isVisible);
            param1.writeUTF(clanTag);
            param1.writeShort(petLevel);
            param1.writeShort(petFactionId);
            return(param1.ToByteArray());
        }
        public static byte[] write(int ownerId, int petId, short shipType, short expansionStage, string petName, short factionId, int clanId, short petLevel, string clanTag, int x, int y, int petSpeed, class_11d varzL)
        {
            var param1 = new ByteArray(ID);

            param1.writeInt(x >> 4 | x << 28);
            param1.writeShort(factionId);
            param1.writeShort(petLevel);
            param1.write(varzL.write());
            param1.writeInt(y >> 6 | y << 26);
            param1.writeShort(-19144);
            param1.writeInt(petId << 13 | petId >> 19);
            param1.writeInt(ownerId << 2 | ownerId >> 30);
            param1.writeUTF(petName);
            param1.writeUTF(clanTag);
            param1.writeShort(expansionStage);
            param1.writeShort(shipType);
            param1.writeInt(clanId >> 12 | clanId << 20);
            param1.writeInt(petSpeed >> 1 | petSpeed << 31);
            return(param1.ToByteArray());
        }