Exemplo n.º 1
0
        static public void F_REQUEST_CHAR(BaseClient client, PacketIn packet)
        {
            GameClient cclient = client as GameClient;

            cclient.State = (int)eClientState.CharScreen;

            UInt16 Operation = packet.GetUint16();

            if (Operation == 0x2D58)
            {
                PacketOut Out = new PacketOut((byte)Opcodes.F_REQUEST_CHAR_ERROR);
                Out.WriteByte((byte)CharMgr.GetAccountRealm(cclient._Account.AccountId));
                cclient.SendTCP(Out);
            }

            else
            {
                PacketOut Out = new PacketOut((byte)Opcodes.F_REQUEST_CHAR_RESPONSE);


                Out.FillString(cclient._Account.Username, 25); // account name
                Out.WriteByte(0xFF);
                Out.WriteByte(CharMgr.MAX_SLOT);               // Max characters 20
                Out.WriteUInt16(0);                            // unk
                Out.WriteByte(0);                              // name changing tokens, 1 will enable button
                Out.WriteUInt16(0);                            //unk

                byte[] Chars = CharMgr.BuildCharactersList(cclient._Account.AccountId);
                Out.Write(Chars, 0, Chars.Length);
                cclient.SendTCP(Out);
            }
        }
Exemplo n.º 2
0
        public static void F_REQUEST_CHAR(BaseClient client, PacketIn packet)
        {
            GameClient cclient = client as GameClient;

            cclient.State = (int)eClientState.CharScreen;

            ushort Operation = packet.GetUint16();

            if (Operation == 0x2D58)
            {
                PacketOut Out = new PacketOut((byte)Opcodes.F_REQUEST_CHAR_ERROR, 1);
                Out.WriteByte((byte)CharMgr.GetAccountRealm(cclient._Account.AccountId));
                cclient.SendPacket(Out);
            }
            else
            {
                PacketOut Out = new PacketOut((byte)Opcodes.F_REQUEST_CHAR_RESPONSE, 64);
                Out.FillString(cclient._Account.Username, 20);
                Out.WriteUInt32(0); //RemainingLockoutTime
                Out.WriteByte(0);

                if (cclient._Account.GmLevel == 0 && !Program.Config.CreateBothRealms)
                {
                    Out.WriteByte((byte)CharMgr.GetAccountRealm(cclient._Account.AccountId));
                }
                else
                {
                    Out.WriteByte(0);
                }

                Out.WriteByte(CharMgr.MaxSlot); //Maximum Characters you can have
                Out.WriteByte(0);               //GameplayRulesetType
                Out.WriteByte(0);               //LastSwitchedToRealm
                Out.WriteByte(0);               //NumPaidNameChangesAvailable
                Out.WriteByte(0);               // unk

                byte[] Chars = CharMgr.BuildCharacters(cclient._Account.AccountId);
                Out.Write(Chars, 0, Chars.Length);

                cclient.SendPacket(Out);
            }
        }
Exemplo n.º 3
0
        static public void F_REQUEST_CHAR(BaseClient client, PacketIn packet)
        {
            GameClient cclient = client as GameClient;

            cclient.State = (int)eClientState.CharScreen;

            UInt16 Operation = packet.GetUint16();

            if (Operation == 0x2D58)
            {
                PacketOut Out = new PacketOut((byte)Opcodes.F_REQUEST_CHAR_ERROR);
                Out.WriteByte((byte)CharMgr.GetAccountRealm(cclient._Account.AccountId));
                cclient.SendPacket(Out);
            }
            else
            {
                PacketOut Out = new PacketOut((byte)Opcodes.F_REQUEST_CHAR_RESPONSE);
                Out.FillString(cclient._Account.Username, 21);
                Out.WriteByte(0);
                Out.WriteByte(0);
                Out.WriteByte(0);
                Out.WriteByte(4);

                if (cclient._Account.GmLevel == 0 && !Program.Config.CreateBothRealms)
                {
                    Out.WriteByte((byte)CharMgr.GetAccountRealm(cclient._Account.AccountId));
                }
                else
                {
                    Out.WriteByte(0);
                }

                byte[] Chars = CharMgr.BuildCharacters(cclient._Account.AccountId);
                Out.Write(Chars, 0, Chars.Length);
                Out.WritePacketLength();
                cclient.SendPacket(Out);
            }
        }