Ejemplo n.º 1
0
 // Initializes all values to be saved into the database
 public Player(long accountId, string name, byte gender, Job job, SkinColor skinColor)
 {
     AccountId   = accountId;
     Name        = name;
     Gender      = gender;
     Job         = job;
     GameOptions = new GameOptions();
     GameOptions.Initialize();
     Wallet = new Wallet(this, meso: 0, meret: 0, gameMeret: 0, eventMeret: 0, valorToken: 0, treva: 0, rue: 0,
                         haviFruit: 0, mesoToken: 0, bank: 0);
     Levels = new Levels(this, playerLevel: 1, exp: 0, restExp: 0, prestigeLevel: 1, prestigeExp: 0, new List <MasteryExp>()
     {
         new MasteryExp(MasteryType.Fishing, 0, 0),
         new MasteryExp(MasteryType.Performance, 0, 0),
         new MasteryExp(MasteryType.Mining, 0, 0),
         new MasteryExp(MasteryType.Foraging, 0, 0),
         new MasteryExp(MasteryType.Ranching, 0, 0),
         new MasteryExp(MasteryType.Farming, 0, 0),
         new MasteryExp(MasteryType.Smithing, 0, 0),
         new MasteryExp(MasteryType.Handicraft, 0, 0),
         new MasteryExp(MasteryType.Alchemy, 0, 0),
         new MasteryExp(MasteryType.Cooking, 0, 0),
         new MasteryExp(MasteryType.PetTaming, 0, 0)
     });
     Timestamps             = new TimeInfo(DateTimeOffset.UtcNow.ToUnixTimeSeconds());
     MapId                  = 52000065;
     Coord                  = CoordF.From(-675, 525, 600); // Intro map (52000065)
     Stats                  = new PlayerStats(strBase: 10, dexBase: 10, intBase: 10, lukBase: 10, hpBase: 500, critRateBase: 10);
     Motto                  = "Motto";
     ProfileUrl             = "";
     HomeName               = "HomeName";
     CreationTime           = DateTimeOffset.Now.ToUnixTimeSeconds() + Environment.TickCount;
     TitleId                = 0;
     InsigniaId             = 0;
     Titles                 = new List <int>();
     PrestigeRewardsClaimed = new List <int>();
     ChatSticker            = new List <ChatSticker>();
     FavoriteStickers       = new List <int>();
     Emotes                 = new List <int>()
     {
         90200011, 90200004, 90200024, 90200041, 90200042, 90200057, 90200043, 90200022, 90200031, 90200005, 90200006, 90200003, 90200092, 90200077, 90200073, 90200023, 90200001, 90200019, 90200020, 90200021
     };
     SkillTabs = new List <SkillTab> {
         new SkillTab(job)
     };
     StatPointDistribution = new StatDistribution(20);
     Inventory             = new Inventory();
     BankInventory         = new BankInventory();
     Mailbox     = new Mailbox();
     BuddyList   = new List <Buddy>();
     QuestList   = new List <QuestStatus>();
     TrophyCount = new int[3] {
         0, 0, 0
     };
     ReturnMapId   = (int)Map.Tria;
     ReturnCoord   = CoordF.From(-900, -900, 3000);
     GroupChatId   = new int[3];
     SkinColor     = skinColor;
     UnlockedTaxis = new List <int>();
     UnlockedMaps  = new List <int>();
     CharacterId   = DatabaseManager.CreateCharacter(this);
 }
Ejemplo n.º 2
0
 public Npc(int id)
 {
     this.Id        = id;
     this.Animation = 255;
     this.stats     = PlayerStats.Default();
 }
Ejemplo n.º 3
0
        public static Player Char1(
            long accountId,
            long characterId,
            string name     = "",
            int job         = 0,
            short level     = 0,
            byte gender     = 0,
            string motto    = "",
            string homename = "",
            long Mesos      = 0,
            long Merets     = 0,
            long ValorToken = 0,
            long Treva      = 0,
            long Rue        = 0,
            long HaviFruit  = 0,
            long MesoToken  = 0,
            short Storage   = 0)
        {
            PlayerStats stats = PlayerStats.Default();

            List <SkillTab> skillTabs = new List <SkillTab>();

            skillTabs.Add(XmlParser.ParseSkills(job));

            Player player = new Player
            {
                SkillTabs   = skillTabs,
                MapId       = 2000062,
                AccountId   = accountId,
                CharacterId = characterId,
                Level       = level,
                Name        = name,
                Gender      = gender,
                Motto       = motto,
                HomeName    = homename,
                Coord       = CoordF.From(2850, 2550, 1800), //Little Harbor
                //Coord = CoordF.From(500, 500, 15000), // tria
                JobGroupId = job,
                SkinColor  = new SkinColor()
                {
                    Primary = Color.Argb(0xFF, 0xEA, 0xBF, 0xAE)
                },
                CreationTime = DateTimeOffset.Now.ToUnixTimeSeconds() + Environment.TickCount,
                Equips       = new Dictionary <ItemSlot, Item> {
                    { ItemSlot.ER, Item.Ear() },
                    { ItemSlot.HR, Item.Hair() },
                    { ItemSlot.FA, Item.Face() },
                    { ItemSlot.FD, Item.FaceDecoration() }
                },
                Stats       = stats,
                GameOptions = new GameOptions(),
                Mesos       = Mesos,
                Merets      = Merets,
                ValorToken  = ValorToken,
                Treva       = Treva,
                Rue         = Rue,
                HaviFruit   = HaviFruit,
                MesoToken   = MesoToken,
                Inventory   = new Inventory(Storage),
                Mailbox     = new Mailbox()
            };

            player.Equips.Add(ItemSlot.RH, Item.TutorialBow(player));
            return(player);
        }
Ejemplo n.º 4
0
        public static Player Char1(long accountId, long characterId, string name = "Char1")
        {
            Job              job   = Job.Archer;
            PlayerStats      stats = PlayerStats.Default();
            StatDistribution statPointDistribution = new StatDistribution(totalStats: 18);
            List <SkillTab>  skillTabs             = new List <SkillTab>
            {
                new SkillTab(job)
            };

            Player player = new Player
            {
                SkillTabs             = skillTabs,
                StatPointDistribution = statPointDistribution,
                MapId       = 2000062,
                AccountId   = accountId,
                CharacterId = characterId,
                Name        = name,
                Gender      = 1,
                Motto       = "Motto",
                HomeName    = "HomeName",
                Coord       = CoordF.From(2850, 2550, 1800), // Lith Harbor (2000062)
                // Coord = CoordF.From(500, 500, 15000), // Tria
                Job       = job,
                SkinColor = new SkinColor()
                {
                    Primary = Color.Argb(0xFF, 0xEA, 0xBF, 0xAE)
                },
                CreationTime = DateTimeOffset.Now.ToUnixTimeSeconds() + Environment.TickCount,
                Equips       = new Dictionary <ItemSlot, Item> {
                    { ItemSlot.ER, Item.Ear() },
                    { ItemSlot.HR, Item.Hair() },
                    { ItemSlot.FA, Item.Face() },
                    { ItemSlot.FD, Item.FaceDecoration() }
                },
                Stats    = stats,
                Stickers = new List <short>
                {
                    1, 2, 3, 4, 5, 6, 7
                },
                Emotes = new List <int>
                {
                    90200011, 90200004, 90200024, 90200041, 90200042,
                    90200057, 90200043, 90200022, 90200031, 90200005,
                    90200006, 90200003, 90200092, 90200077, 90200073,
                    90200023, 90200001, 90200019, 90200020, 90200021,
                    90200009, 90200027, 90200010, 90200028, 90200051,
                    90200015, 90200016, 90200055, 90200060, 90200017,
                    90200018, 90200093, 90220033, 90220012, 90220001, 90220033
                },
                TitleId    = 10000503,
                InsigniaId = 33,
                Titles     = new List <int> {
                    10000569, 10000152, 10000570, 10000171, 10000196, 10000195, 10000571, 10000331, 10000190,
                    10000458, 10000465, 10000503, 10000512, 10000513, 10000514, 10000537, 10000565, 10000602,
                    10000603, 10000638, 10000644
                }
            };

            player.Equips.Add(ItemSlot.RH, Item.TutorialBow(player));
            return(player);
        }