Example #1
0
        public static Command 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, commandK13 P1K)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(y >> 12 | y << 20);
            cmd.Short(expansionStage);
            cmd.Integer(x << 1 | x >> 31);
            cmd.Boolean(isVisible);
            cmd.Integer(ownerId << 7 | ownerId >> 25);
            cmd.Integer(petClanID >> 9 | petClanID << 23);
            cmd.Integer(petId << 5 | petId >> 27);
            cmd.Boolean(isInIdleMode);
            cmd.Integer(petSpeed >> 4 | petSpeed << 28);
            cmd.UTF(clanTag);
            cmd.Short(petLevel);
            cmd.Short(petDesignId);
            cmd.Short(petFactionId);
            cmd.UTF(petName);
            cmd.AddBytes(P1K.write());
            cmd.AddBytes(clanRelationship.write());
            return(new Command(cmd.ToByteArray(), true));
        }
Example #2
0
        public static Command write(int userId, string shipType, int expansionStage, string clanTag, string userName, int x, int y,
                                    int factionId, int clanId, int dailyRank, bool warnBox, ClanRelationModule varT1o, int galaxyGatesDone, bool useSystemFont,
                                    bool npc, bool cloaked, int motherShipId, int positionIndex, List <VisualModifierCommand> modifier, commandK13 varP1K)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(x >> 2 | x << 30);
            cmd.Integer(motherShipId >> 9 | motherShipId << 23);
            cmd.UTF(userName);
            cmd.Integer(userId << 6 | userId >> 26);
            cmd.AddBytes(varP1K.write());
            cmd.UTF(clanTag);
            cmd.Integer(clanId << 11 | clanId >> 21);
            cmd.Boolean(warnBox);
            cmd.Integer(expansionStage >> 12 | expansionStage << 20);
            cmd.Boolean(npc);
            cmd.Boolean(useSystemFont);
            cmd.Integer(galaxyGatesDone << 7 | galaxyGatesDone >> 25);
            cmd.Integer(positionIndex >> 2 | positionIndex << 30);
            cmd.Boolean(cloaked);
            cmd.AddBytes(varT1o.write());
            cmd.Integer(factionId << 13 | factionId >> 19);
            cmd.Integer(modifier.Count);
            foreach (var c in modifier)
            {
                cmd.AddBytes(c.write());
            }
            cmd.Integer(dailyRank >> 3 | dailyRank << 29);
            cmd.Integer(y >> 15 | y << 17);
            cmd.UTF(shipType);
            return(new Command(cmd.ToByteArray(), true));
        }