예제 #1
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));
        }
예제 #2
0
        public static Command 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, bool showBubble, ClanRelationModule clanRelation, List <VisualModifierCommand> modifier)
        {
            var cmd = new ByteArray(ID);

            cmd.UTF(clanTag);
            cmd.Integer(expansionStage << 1 | expansionStage >> 31);
            cmd.Integer(assetId << 10 | assetId >> 22);
            cmd.AddBytes(clanRelation.write());
            cmd.Boolean(invisible);
            cmd.AddBytes(type.write());
            cmd.Integer(posX << 2 | posX >> 30);
            cmd.Integer(designId << 11 | designId >> 21);
            cmd.Integer(clanId >> 9 | clanId << 23);
            cmd.Integer(posY << 10 | posY >> 22);
            cmd.Boolean(showBubble);
            cmd.Boolean(detectedByWarnRadar);
            cmd.Integer(modifier.Count);
            foreach (var _loc2_ in modifier)
            {
                cmd.AddBytes(_loc2_.write());
            }
            cmd.Integer(factionId << 3 | factionId >> 29);
            cmd.Boolean(visibleOnWarnRadar);
            cmd.UTF(userName);
            return(new Command(cmd.ToByteArray(), true));
        }
예제 #3
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));
        }