Exemplo n.º 1
0
        public static void CreateNewCharacter(KUser user)
        {
            var p = new Packet(GameOpcodes.EVENT_NEW_CHAR_CHOICE_ACK);

            throw new NotImplementedException("TODO :///");

            user.userClient.Client.SendPacket(p);
        }
Exemplo n.º 2
0
        public static void BuyVpItem(KUser user, Packet packet)
        {
            // 02 A4 00 00 00 04 00 00 01 8E 8E 00 00 00 00 01 02 03 04 05 06 07 08 08
            var itemId = packet.ReadInt();

            Packet p = new Packet(GameOpcodes.EVENT_ITEM_BUY_CHECK_ACK);

            p.Put(
                1,     // probably count
                itemId //36353 // Item ID? 00 01 8E 8E
                );
            user.userClient.Client.SendPacket(p);
        }
Exemplo n.º 3
0
        public static void CreateNewCharacter(KUser kUser, Packet packet)
        {
            var characterType = (int)packet.ReadByte();

            Console.WriteLine("Character ID: {0}", characterType);

            var character = new Character()
            {
                UserId        = kUser.userId,
                CharacterType = characterType
            };

            using (var db = Database.Get())
            {
                character.Insert(db);
            }

            kUser.characters.Add(character.Id, character);
            kUser.currentCharacterId = character.Id;

            var p = new Packet(GameOpcodes.EVENT_NEW_CHAR_CHOICE_ACK, kUser);

            p.Write(0x00); // m_ucOK
            p.Put(characterType);
            p.WriteHexString("64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 00 00 00 01");

            Inventory.Inventory.WriteDefaultEquipItemInfo(p, characterType, kUser);

            p.WriteHexString("00 00 00 02 00 00 00 A0 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 2C 00 00 01 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 07 D0 00 00 07 D0 00 00 00 0A 00 00 00 00 00 00 00 5A 00 00 00 64 00 00 00 00 00 00 00 00 FF EA 7D A8 00 00 00 55");

            DungeonUserInfo.WriteMapDifficulty(p); // lol

            Inventory.Inventory.GiveDefaultItems(p, characterType, kUser);

            p.WriteHexString("00 00 00 00 00 00 00 02 00 00 00 14 00 00 00");

            WriteEnabledCharacters(p);

            p.Write(255);

            p.WriteHexString("00 00 00 01 00 00 E5 6A 00 00 00 00 02 06 CC BA 00 00 00 14 00 00 00 14 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF 01 A1 AB 5D 08 D7 50 D0 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 E5 6A 00 00 00 00 02 06 CC BA 06 00 00 00 00 00 00 00");

            //Log.Get().Trace(Util.Util.ConvertBytesToHexString(p.packet.ToArray()));

            kUser.userClient.Client.SendPacket(p);
        }
Exemplo n.º 4
0
 public UserClient(Client c)
 {
     Client = c;
     KUser  = new KUser(this);
 }