Example #1
0
        public static Player Char1(long accountId, long characterId, string name = "Char1")
        {
            Job              job   = Job.Archer;
            PlayerStats      stats = new PlayerStats();
            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,
                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);
        }
Example #2
0
        public static Player Priest(long accountId, long characterId, string name = "Priest")
        {
            Job              job   = Job.Priest;
            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,
                GameOptions = new GameOptions(),
                Inventory   = new Inventory(48),
                Mailbox     = new Mailbox(),
                Stickers    = new List <short>
                {
                    1, 2, 3, 4, 5, 6, 7
                },
                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
                },
                IsVIP = false,
            };

            player.Equips.Add(ItemSlot.RH, Item.DefaultScepter(player));
            player.Equips.Add(ItemSlot.LH, Item.DefaultCodex(player));
            return(player);
        }
Example #3
0
        public static Player Char1(long accountId, long characterId, string name = "Char1")
        {
            int job = 50; // Archer

            PlayerStats      stats = PlayerStats.Default();
            StatDistribution StatPointDistribution = new StatDistribution();

            List <SkillTab> skillTabs = new List <SkillTab>
            {
                XmlParser.ParseSkills(job)
            };

            Player player = new Player
            {
                SkillTabs             = skillTabs,
                StatPointDistribution = StatPointDistribution,
                MapId       = 2000062,
                AccountId   = accountId,
                CharacterId = characterId,
                Level       = 70,
                Name        = name,
                Gender      = 1,
                Motto       = "Motto",
                HomeName    = "HomeName",
                Coord       = CoordF.From(2850, 2550, 1800), // Lith Harbor (2000062)
                // 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       = 200000,
                Merets      = 50,
                ValorToken  = 1,
                Treva       = 2,
                Rue         = 3,
                HaviFruit   = 4,
                MesoToken   = 5,
                Inventory   = new Inventory(48),
                Mailbox     = new Mailbox(),
                TitleId     = 10000292,
                InsigniaId  = 29
            };

            player.Equips.Add(ItemSlot.RH, Item.TutorialBow(player));
            return(player);
        }
Example #4
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();
     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>());
     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>();
     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);
 }
Example #5
0
 // Initializes all values to be saved into the database
 public Player(Account account, string name, byte gender, Job job, SkinColor skinColor)
 {
     AccountId   = account.Id;
     Account     = account;
     Name        = name;
     Gender      = gender;
     Job         = job;
     GameOptions = new GameOptions();
     Wallet      = new Wallet(meso: 0, valorToken: 0, treva: 0, rue: 0, haviFruit: 0);
     Levels      = new Levels(playerLevel: 1, exp: 0, restExp: 0, prestigeLevel: 1, prestigeExp: 0, new List <MasteryExp>()
     {
         new MasteryExp(MasteryType.Fishing),
         new MasteryExp(MasteryType.Performance),
         new MasteryExp(MasteryType.Mining),
         new MasteryExp(MasteryType.Foraging),
         new MasteryExp(MasteryType.Ranching),
         new MasteryExp(MasteryType.Farming),
         new MasteryExp(MasteryType.Smithing),
         new MasteryExp(MasteryType.Handicraft),
         new MasteryExp(MasteryType.Alchemy),
         new MasteryExp(MasteryType.Cooking),
         new MasteryExp(MasteryType.PetTaming)
     });
     Timestamps             = new TimeInfo(DateTimeOffset.UtcNow.ToUnixTimeSeconds());
     MapId                  = JobMetadataStorage.GetStartMapId((int)job);
     Coord                  = MapEntityStorage.GetRandomPlayerSpawn(MapId).Coord.ToFloat();
     Stats                  = new PlayerStats(strBase: 10, dexBase: 10, intBase: 10, lukBase: 10, hpBase: 500, critRateBase: 10);
     Motto                  = "Motto";
     ProfileUrl             = "";
     CreationTime           = DateTimeOffset.Now.ToUnixTimeSeconds();
     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
     };
     StatPointDistribution = new StatDistribution(20);
     Inventory             = new Inventory();
     Mailbox        = new List <Mail>();
     BuddyList      = new List <Buddy>();
     QuestList      = new List <QuestStatus>();
     GatheringCount = new List <GatheringCount>();
     TrophyCount    = new int[3] {
         0, 0, 0
     };
     ReturnMapId      = (int)Map.Tria;
     ReturnCoord      = MapEntityStorage.GetRandomPlayerSpawn(ReturnMapId).Coord.ToFloat();
     GroupChatId      = new int[3];
     SkinColor        = skinColor;
     UnlockedTaxis    = new List <int>();
     UnlockedMaps     = new List <int>();
     ActiveSkillTabId = 1;
     CharacterId      = DatabaseManager.Characters.Insert(this);
     SkillTabs        = new List <SkillTab> {
         new SkillTab(CharacterId, job, 1, $"Build {(SkillTabs == null ? "1" : SkillTabs.Count + 1)}")
     };
 }