Exemplo n.º 1
0
        public static InjectDisplayPacket Create(ConnectionProvider connection, bool Injected)
        {
            PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.InjectDisplayText);
            p.AddByte(Convert.ToByte(Injected));

            return new InjectDisplayPacket(connection, p.GetPacket());
        }
Exemplo n.º 2
0
        public static RemoveTextPacket Create(ConnectionProvider connection, string TextName)
        {
            PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.RemoveText);
            p.AddString(TextName);

            return new RemoveTextPacket(connection, p.GetPacket());
        }
        public static RemoveCreatureTextPacket Create(ConnectionProvider connection, int CreatureID, string CreatureName)
        {
            PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.RemoveCreatureText);
            p.AddLong(CreatureID);
            p.AddString(CreatureName);

            return new RemoveCreatureTextPacket(connection, p.GetPacket());
        }
        public static UpdateCreatureTextPacket Create(ConnectionProvider connection, int CreatureID, string CreatureName, Location TextLoc, string NewText)
        {
            PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.UpdateCreatureText);
            p.AddLong(CreatureID);
            p.AddString(CreatureName);
            p.AddShort(TextLoc.X);
            p.AddShort(TextLoc.Y);
            p.AddString(NewText);

            return new UpdateCreatureTextPacket(connection, p.GetPacket());
        }
Exemplo n.º 5
0
        public static DisplayTextPacket Create(ConnectionProvider connection, string textId, Location loc, Color color, ClientFont font, string text)
        {
            PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.DisplayText);
            p.AddString(textId);
            p.AddInt(loc.X.ToInt32());
            p.AddInt(loc.Y.ToInt32());
            p.AddInt(color.R);
            p.AddInt(color.G);
            p.AddInt(color.B);
            p.AddInt((int)font);
            p.AddString(text);

            return new DisplayTextPacket(connection, p.GetPacket());
        }
        public static DisplayCreatureTextPacket Create(ConnectionProvider connection, int creatureID, string creatureName, Location loc, Color color, ClientFont font, string text)
        {
            PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.DisplayCreatureText);
            p.AddLong(creatureID);
            p.AddString(creatureName);
            p.AddShort(loc.X);
            p.AddShort(loc.Y);
            p.AddInt(color.R);
            p.AddInt(color.G);
            p.AddInt(color.B);
            p.AddInt((int)font);
            p.AddString(text);

            return new DisplayCreatureTextPacket(connection, p.GetPacket());
        }
Exemplo n.º 7
0
        public new bool ParseData(byte[] packet)
        {
            if (base.ParseData(packet))
            {
                if (pipetype != PipePacketType.RemoveAllText) { return false; }
                PipePacketBuilder p = new PipePacketBuilder(ConnectionSource, packet, 3);
                index = p.Index;

                return true;
            }
            else
            {
                return false;
            }
        }
Exemplo n.º 8
0
        public new bool ParseData(byte[] packet)
        {
            if (base.ParseData(packet))
            {
                if (pipetype != PipePacketType.InjectDisplayText) { return false; }
                PipePacketBuilder p = new PipePacketBuilder(ConnectionSource, packet, 3);
                injected = Convert.ToBoolean(p.GetByte());

                index = p.Index;
                return true;
            }
            else
            {
                return false;
            }
        }
        public new bool ParseData(byte[] packet)
        {
            if (base.ParseData(packet))
            {
                if (pipetype != PipePacketType.RemoveCreatureText) { return false; }
                PipePacketBuilder p = new PipePacketBuilder(ConnectionSource, packet, 3);
                creatureID = p.GetLong();
                creatureName = p.GetString();

                index = p.Index;
                return true;
            }
            else
            {
                return false;
            }
        }
Exemplo n.º 10
0
        public new bool ParseData(byte[] packet)
        {
            if (base.ParseData(packet)) {
                if (pipetype != PipePacketType.DisplayText) { return false; }
                PipePacketBuilder p = new PipePacketBuilder(ConnectionSource, packet, 3);
                textname = p.GetString();
                loc.X = p.GetInt();
                loc.Y = p.GetInt();
                loc.Z = 0; // No need
                red = p.GetInt();
                green = p.GetInt();
                blue = p.GetInt();
                color = Color.FromArgb(red, green, blue);
                font = (ClientFont)p.GetInt();
                text = p.GetString();

                index = p.Index;
                return true;
            }
            else {
                return false;
            }
        }
Exemplo n.º 11
0
 public static RemoveAllTextPacket Create(ConnectionProvider connection)
 {
     PipePacketBuilder p = new PipePacketBuilder(connection, PipePacketType.RemoveAllText);
     return new RemoveAllTextPacket(connection, p.GetPacket());
 }