Esempio n. 1
0
        public void SendCharacterCreate(byte[] data)
        {
            var iPkt = new UC_CHARACTER_ADD_REQ();

            iPkt.SetData(data);
            SysCons.LogInfo(
                "UC_CHARACTER_ADD_REQ Name({0}) Race({1}) Class({2}) Gender({3}) Face({4}) Hair({5}) HairColor({6}) SkinColor({7}) Blood({8})",
                iPkt.Name,
                ((CharRaces)iPkt.Race).ToString(),
                ((CharClasses)iPkt.Class).ToString(),
                ((CharGenders)iPkt.Gender).ToString(),
                iPkt.Face,
                iPkt.Hair,
                iPkt.HairColor,
                iPkt.SkinColor,
                iPkt.Blood
                );
        }
Esempio n. 2
0
        internal void SendCharacterAdd(byte[] data)
        {
            //TO DO UC_CHARACTER_ADD_REQ
            SysCons.LogInfo("UC_CHARACTER_ADD_REQ");
            UC_CHARACTER_ADD_REQ iPkt = new UC_CHARACTER_ADD_REQ();

            iPkt.SetData(data);
            SysCons.LogInfo(
                "UC_CHARACTER_ADD_REQ Name({0}) Race({1}) Class({2}) Gender({3}) Face({4}) Hair({5}) HairColor({6}) SkinColor({7}) Blood({8})",
                iPkt.Name,
                ((CharRaces)iPkt.Race).ToString(),
                ((CharClasses)iPkt.Class).ToString(),
                ((CharGenders)iPkt.Gender).ToString(),
                iPkt.Face,
                iPkt.Hair,
                iPkt.HairColor,
                iPkt.SkinColor,
                iPkt.Blood
                );
            //dlaczego wczesniej bylo var ?
            CU_CHARACTER_ADD_RES oPkt = new CU_CHARACTER_ADD_RES();

            oPkt.ResultCode = (ushort)CharDB.InsertCharacter(this.AccountID, this.ServerID, iPkt.Name, iPkt.Race, iPkt.Class,
                                                             iPkt.Gender, iPkt.Face, iPkt.Hair, iPkt.HairColor, iPkt.SkinColor);
            oPkt.charID      = 1;
            oPkt.Name        = iPkt.Name;
            oPkt.Race        = iPkt.Race;
            oPkt.Class       = iPkt.Class;
            oPkt.Gender      = iPkt.Gender;
            oPkt.Face        = iPkt.Face;
            oPkt.Hair        = iPkt.Hair;
            oPkt.Gender      = iPkt.Gender;
            oPkt.HairColor   = iPkt.HairColor;
            oPkt.SkinColor   = iPkt.SkinColor;
            oPkt.worldTblidx = 1;
            oPkt.worldId     = 1;
            oPkt.BuildPacket();
            this.Client.Send(oPkt.Data);
        }
Esempio n. 3
0
        public void SendCharacterCreate(byte[] data)
        {
            var iPkt = new UC_CHARACTER_ADD_REQ();

            iPkt.SetData(data);
            SysCons.LogInfo(
                "UC_CHARACTER_ADD_REQ Name({0}) Race({1}) Class({2}) Gender({3})",
                iPkt.Name,
                ((CharRaces)iPkt.Race).ToString(),
                ((CharClasses)iPkt.Class).ToString(),
                ((CharGenders)iPkt.Gender).ToString()
                );

            using (var oPkt = new CU_CHARACTER_ADD_RES())
            {
                oPkt.ResultCode    = (ushort)ResultCodes.CHARACTER_SUCCESS;
                oPkt.CharID        = (uint)(new Random().Next());
                oPkt.Race          = iPkt.Race;
                oPkt.Class         = iPkt.Class;
                oPkt.Gender        = iPkt.Gender;
                oPkt.Name          = iPkt.Name;
                oPkt.Face          = iPkt.Face;
                oPkt.Hair          = iPkt.Hair;
                oPkt.HairColor     = iPkt.HairColor;
                oPkt.SkinColor     = iPkt.SkinColor;
                oPkt.Level         = 1;
                oPkt.WorldId       = 1;
                oPkt.WorldTblIndex = 1;
                oPkt.PositionX     = 2902.0f;
                oPkt.PositionY     = 0.0f;
                oPkt.PositionZ     = -2370.0f;
                oPkt.Zenny         = 0;
                oPkt.ZennyBank     = 0;
                oPkt.BuildCharEquipaments(oPkt.CharID);
                oPkt.BuildPacket();
                Client.Send(oPkt.Data);
            }
        }
Esempio n. 4
0
        public void SendCharacterCreate(byte[] data)
        {
            var iPkt = new UC_CHARACTER_ADD_REQ();

            iPkt.SetData(data);
            SysCons.LogInfo(
                "UC_CHARACTER_ADD_REQ Name({0}) Race({1}) Class({2}) Gender({3}) Face({4}) Hair({5}) HairColor({6}) SkinColor({7}) Blood({8})",
                iPkt.Name,
                ((CharRaces)iPkt.Race).ToString(),
                ((CharClasses)iPkt.Class).ToString(),
                ((CharGenders)iPkt.Gender).ToString(),
                iPkt.Face,
                iPkt.Hair,
                iPkt.HairColor,
                iPkt.SkinColor,
                iPkt.Blood
                );

            var oPkt = new CU_CHARACTER_ADD_RES();

            oPkt.ResultCode = (ushort)ResultCodes.CHARACTER_SAMENAME_EXIST;
            oPkt.BuildPacket();
            this.Client.Send(oPkt.Data);
        }