コード例 #1
0
        internal void CreateCharacter(Account account, Character Character)
        {
            Character.AccountName = account.Name;
            Character.ServerId    = Configuration.Setting.ServerId;
            Character.Level       = 1;
            Character.JobLevel    = 1;
            Character.NameStyle   = "0000000000000000FFFFFFFFFFFFFFFF0100000000000000FFFFFFFFFFFFFFFF0200000000000000FFFFFFFFFFFFFFFF".ToBytes();
            Character.GameStats   = StatsService.GetInstance().InitStats(Character);
            Character.Position    = new Model.Map.MapPosition()
            {
                MapId = 101,
                X     = BitConverter.GetBytes(300.0F),
                Y     = BitConverter.GetBytes(1865.0F),
                Z     = BitConverter.GetBytes(15.0F),
                oldX  = new byte[0],
                oldY  = new byte[0],
                oldZ  = new byte[0],
            };

            MdbCharacter.GetInstance().AddCharacter(Character);

            account._Client.SendPacket(new ResponseCreateCharacter(1));
        }
コード例 #2
0
 public static StatsService GetInstance()
 {
     return (Instance != null) ? Instance : Instance = new StatsService();
 }