Quote:
|
haha you might as well just get the baseStream... google for getBaseStream or getStream method implementation @ BinaryReader. Should give you a few hits, its simple though and would make your shit SUBSTANTIALLY faster.
|
hm , u r right this code is so bad , i just rushed for a working code .
i googled for the getbasestream and i don't get it , how to use that in my code ?
i dont use any binaryreader , and i deal with the stream for read or write by the SilkroadsecurityAPI .Packet.Read & packet.Write methods (i don't deal with the stream directly)
i just made a new code i think it much faster
Code:
if (pack.Opcode==0x3015||pack.Opcode==0x3019)
{
byte[] packetbytes=pack.GetBytes();
string PacketString = System.Text.Encoding.Default.GetString(packetbytes);
bool r1 = PacketString.Contains("[GM]");
if (r1)
{
// the teleport packet ;
}
}
Thank you for the Advice's guys .