Esempio n. 1
0
        public static void SendAuthSuccessful(IRealmClient client)
        {
            using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_AUTH_RESPONSE, 11))
            {
                packet.WriteByte((byte)LoginErrorCode.AUTH_OK);

                //BillingTimeRemaining
                packet.Write(0);

                packet.Write((byte)0x02);                // BillingPlan Flags
                // 0x2, 0x4, 0x10 mutually exclusive. Order of Precedence: 0x2 > 0x4 > 0x10
                // 0x2 -> No Time left?
                // 0x20
                // 0x8

                // BillingTimeRested
                packet.Write(0);
                packet.Write((byte)client.Account.ClientId);

                client.Send(packet, addEnd: false);
            }

            ClientAddonHandler.SendAddOnInfoPacket(client);

            RealmServer.Instance.OnClientAccepted(null, null);
        }
Esempio n. 2
0
        public static void SendAuthSuccessful(IRealmClient client)
        {
            using (RealmPacketOut packet = new RealmPacketOut((PacketId)RealmServerOpCode.SMSG_AUTH_RESPONSE, 11))
            {
                packet.WriteByte((byte)12);
                packet.Write(0);
                packet.Write((byte)2);
                packet.Write(0);
                packet.Write((byte)client.Account.ClientId);
                client.Send(packet, false);
            }

            ClientAddonHandler.SendAddOnInfoPacket(client);
            ServerApp <WCell.RealmServer.RealmServer> .Instance.OnClientAccepted((object)null, (EventArgs)null);
        }
Esempio n. 3
0
        public static void SendAddOnInfoPacket(IRealmClient client)
        {
            using (RealmPacketOut packet = new RealmPacketOut(RealmServerOpCode.SMSG_ADDON_INFO))
            {
                if (client.Addons.Length > 0)
                {
                    int num1;
                    using (BinaryReader binReader = new BinaryReader((Stream) new MemoryStream(client.Addons)))
                    {
                        int num2 = binReader.ReadInt32();
                        for (int index = 0; index < num2; ++index)
                        {
                            ClientAddOn addOn = ClientAddonHandler.ReadAddOn(binReader);
                            ClientAddonHandler.WriteAddOnInfo(packet, addOn);
                        }

                        num1 = binReader.ReadInt32();
                    }

                    Console.WriteLine("CMSG ADDON Unk: " + (object)num1);
                }

                packet.Write(0);
                for (int index = 0; index < 0; ++index)
                {
                    packet.Write(0);
                    packet.Write(new byte[16]);
                    packet.Write(new byte[16]);
                    packet.Write(0);
                    packet.Write(0);
                }

                client.Send(packet, false);
            }

            client.Addons = (byte[])null;
        }