Exemplo n.º 1
0
 public void Write(DWriter wtr)
 {
     wtr.Write(A);
     wtr.Write(R);
     wtr.Write(G);
     wtr.Write(B);
 }
Exemplo n.º 2
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(BulletId);
     wtr.Write(OwnerId);
     wtr.Write(ContainerType);
     wtr.Write(Angle);
 }
Exemplo n.º 3
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(Time);
     wtr.Write(BulletId);
     wtr.Write(ObjectId);
     wtr.Write(TargetId);
 }
Exemplo n.º 4
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(Time);
     SlotObject.Write(wtr);
     ItemUsePos.Write(wtr);
     wtr.Write(UseType);
 }
Exemplo n.º 5
0
 public void Write(DWriter wtr)
 {
     wtr.Write(Item);
     wtr.Write(SlotType);
     wtr.Write(Tradeable);
     wtr.Write(Included);
 }
Exemplo n.º 6
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write((byte)EffectType);
     wtr.Write(TargetId);
     PosA.Write(wtr);
     PosB.Write(wtr);
     Color.Write(wtr);
 }
Exemplo n.º 7
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write((short)Offers.Length);
     foreach (var i in Offers)
     {
         wtr.Write(i);
     }
 }
Exemplo n.º 8
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(Time);
     wtr.Write(BulletId);
     wtr.Write(ContainerType);
     Position.Write(wtr);
     wtr.Write(Angle);
 }
 protected override void Write(DWriter wtr)
 {
     wtr.WriteUTF(AccountId);
     wtr.Write(CharId);
     wtr.WriteUTF(Killer);
     wtr.Write(obf0);
     wtr.Write(obf1);
 }
Exemplo n.º 10
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(CommandId);
     wtr.Write(PetId1);
     wtr.Write(PetId2);
     wtr.Write(ObjectId);
     ObjectSlot.Write(wtr);
     wtr.Write((byte)Currency);
 }
 protected override void Write(DWriter wtr)
 {
     wtr.Write(BulletId);
     wtr.Write(OwnerId);
     wtr.Write(ContainerType);
     StartingPos.Write(wtr);
     wtr.Write(Angle);
     wtr.Write(Damage);
 }
Exemplo n.º 12
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(AccountListId);
     wtr.Write((short)AccountIds.Length);
     foreach (var i in AccountIds)
     {
         wtr.WriteUTF(i);
     }
 }
Exemplo n.º 13
0
 protected override void Write(DWriter wtr)
 {
     wtr.WriteUTF(Name);
     wtr.Write(ObjectId);
     wtr.Write(Stars);
     wtr.Write(BubbleTime);
     wtr.WriteUTF(Recipient);
     wtr.WriteUTF(Text);
     wtr.WriteUTF(CleanText);
 }
 protected override void Write(DWriter wtr)
 {
     Position.Write(wtr);
     wtr.Write(Radius);
     wtr.Write(Damage);
     wtr.Write((byte)Effects);
     wtr.Write(EffectDuration);
     wtr.Write(OriginType);
     //Color.Write(psr, wtr);
 }
 protected override void Write(DWriter wtr)
 {
     wtr.Write(AccountListId);
     wtr.Write((ushort)AccountIds.Length);
     foreach (string i in AccountIds)
     {
         wtr.WriteUTF(i);
     }
     wtr.Write(LockAction);
 }
Exemplo n.º 16
0
        protected override void Write(DWriter wtr)
        {
            wtr.Write(TickId);
            wtr.Write(TickTime);

            wtr.Write((short)UpdateStatuses.Length);
            foreach (var i in UpdateStatuses)
            {
                i.Write(wtr);
            }
        }
 protected override void Write(DWriter wtr)
 {
     wtr.Write((ushort)MyOffers.Length);
     foreach (bool i in MyOffers)
     {
         wtr.Write(i);
     }
     wtr.Write((ushort)YourOffers.Length);
     foreach (bool i in YourOffers)
     {
         wtr.Write(i);
     }
 }
        protected override void Write(DWriter wtr)
        {
            wtr.Write((ushort)MyItems.Length);
            foreach (TradeItem i in MyItems)
            {
                i.Write(wtr);
            }

            wtr.WriteUTF(YourName);
            wtr.Write((ushort)YourItems.Length);
            foreach (TradeItem i in YourItems)
            {
                i.Write(wtr);
            }
        }
 protected override void Write(DWriter wtr)
 {
     wtr.Write(Tier);
     wtr.WriteUTF(Goal);
     wtr.WriteUTF(Description);
     wtr.WriteUTF(Image);
 }
Exemplo n.º 20
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(Time);
     Position.Write(wtr);
     SlotObject1.Write(wtr);
     SlotObject2.Write(wtr);
 }
 protected override void Write(DWriter wtr)
 {
     wtr.Write(TickId);
     wtr.Write(Time);
     Position.Write(wtr);
     if (Records == null)
     {
         wtr.Write((ushort)0);
         return;
     }
     wtr.Write((ushort)Records.Length);
     foreach (TimedPosition i in Records)
     {
         i.Write(wtr);
     }
 }
Exemplo n.º 22
0
 private void m_sendToServer(RawPacket packet)
 {
     if (!dest.Connected)
     {
         return;
     }
     lock (serverSend)
     {
         try
         {
             var wtr = new DWriter(new NetworkStream(dest.Client));
             wtr.Write(packet.content.Length + PACKET_HEADER_SIZE);
             wtr.Write(packet.id);
             wtr.Write(ServerSendKey.Crypt(packet.content));
             wtr.Flush();
         }
         //Only occures when the socket is closed.
         catch (ObjectDisposedException) { }
         catch (IOException) { }
     }
 }
Exemplo n.º 23
0
 public void Write(DWriter wtr)
 {
     try
     {
         wtr.Write(Id);
         Position.Write(wtr);
         wtr.Write((ushort)Stats.Length);
         foreach (KeyValuePair <StatsType, object> i in Stats)
         {
             wtr.Write((byte)i.Key);
             if (i.Key.IsUTF() && i.Value != null)
             {
                 wtr.WriteUTF(i.Value.ToString());
             }
             else
             {
                 wtr.Write((int)i.Value);
             }
         }
     }
     catch (Exception) { }
 }
Exemplo n.º 24
0
 protected override void Write(DWriter wtr)
 {
     wtr.Write(BulletId);
     wtr.Write(OwnerId);
     wtr.Write(BulletType);
     Position.Write(wtr);
     wtr.Write(Angle);
     wtr.Write(Damage);
     wtr.Write(NumShots);
     wtr.Write(AngleInc);
 }
Exemplo n.º 25
0
        static void ServePolicyFile(IAsyncResult ar)
        {
            TcpClient cli = (ar.AsyncState as TcpListener).EndAcceptTcpClient(ar);

            (ar.AsyncState as TcpListener).BeginAcceptTcpClient(ServePolicyFile, ar.AsyncState);
            try
            {
                var     s   = cli.GetStream();
                DReader rdr = new DReader(s);
                DWriter wtr = new DWriter(s);
                if (rdr.ReadNullTerminatedString() == "<policy-file-request/>")
                {
                    wtr.WriteNullTerminatedString(@"<cross-domain-policy>
     <allow-access-from domain=""*"" to-ports=""*"" />
</cross-domain-policy>");
                    wtr.Write((byte)'\r');
                    wtr.Write((byte)'\n');
                }
                cli.Close();
            }
            catch { }
        }
 protected override void Write(DWriter wtr)
 {
     wtr.WriteUTF(Name);
     wtr.WriteUTF(Host);
     wtr.Write(Port);
     wtr.Write(GameId);
     wtr.Write(KeyTime);
     wtr.Write(IsFromArena);
     wtr.Write((short)Key.Length);
     wtr.Write(Key);
 }
Exemplo n.º 27
0
 protected override void Write(DWriter wtr)
 {
     wtr.WriteUTF(BuildVersion);
     wtr.Write(GameId);
     wtr.WriteUTF(GUID);
     wtr.Write(RandomInt1); //random int
     wtr.WriteUTF(Password);
     wtr.Write(RandomInt2); //random int
     wtr.WriteUTF(Secret);
     wtr.Write(KeyTime);
     wtr.Write((short)Key.Length);
     wtr.Write(Key);
     wtr.Write(MapInfo.Length);
     wtr.Write(MapInfo);
     wtr.WriteUTF(obf1);
     wtr.WriteUTF(obf2);
     wtr.WriteUTF(obf3);
     wtr.WriteUTF(obf4);
     wtr.WriteUTF(obf5);
 }
Exemplo n.º 28
0
        protected override void Write(DWriter wtr)
        {
            wtr.Write(Width);
            wtr.Write(Height);
            wtr.WriteUTF(Name);
            wtr.WriteUTF(obf0);
            wtr.Write(obf1);
            wtr.Write(Fp);
            wtr.Write(Background);
            wtr.Write(AllowTeleport);
            wtr.Write(ShowDisplays);

            wtr.Write((short)ClientXML.Length);
            foreach (var i in ClientXML)
            {
                wtr.WriteUTF(i);
            }

            wtr.Write((short)ExtraXML.Length);
            foreach (var i in ExtraXML)
            {
                wtr.WriteUTF(i);
            }
        }
        protected override void Write(DWriter wtr)
        {
            wtr.Write(Width);
            wtr.Write(Height);
            wtr.WriteUTF(Name);
            wtr.WriteUTF(LanguageString);
            wtr.Write(Seed);
            wtr.Write(Background);
            wtr.Write(Difficulty);
            wtr.Write(AllowTeleport);
            wtr.Write(ShowDisplays);

            wtr.Write((ushort)ClientXML.Length);
            foreach (string i in ClientXML)
            {
                wtr.Write32UTF(i);
            }

            wtr.Write((ushort)ExtraXML.Length);
            foreach (string i in ExtraXML)
            {
                wtr.Write32UTF(i);
            }
        }
Exemplo n.º 30
0
 protected override void Write(DWriter wtr)
 {
     wtr.WriteUTF(BuildVersion);
     wtr.Write(GameId);
     wtr.WriteUTF(RSA.Instance.Encrypt(GUID));
     wtr.WriteUTF(RSA.Instance.Encrypt(Password));
     wtr.Write(randomint1);
     wtr.WriteUTF(Secret);
     wtr.Write(KeyTime);
     wtr.Write((short)Key.Length);
     wtr.Write(Key);
     wtr.Write(obf0.Length);
     wtr.Write(obf0);
     wtr.WriteUTF(obf1);
     wtr.WriteUTF(obf2);
     wtr.WriteUTF(obf3);
     wtr.WriteUTF(obf4);
     wtr.WriteUTF(obf5);
 }