Ejemplo n.º 1
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());
        }