Exemple #1
0
        public void PlayerEndGame(Player player)
        {
            if (player.Ai != null)
            {
                player.Ai.Release();
                player.Ai = null;
            }

            AccountService.IdFactory.Release(player.Account.SessionID);

            DataBasePlayer.SavePlayer(player);
            DataBaseStorage.SavePlayerStorage(player.PlayerId, player.Inventory);
            DataBaseAbility.SavePlayerAbility(player, SkillType.Basic);
            DataBaseAbility.SavePlayerAbility(player, SkillType.Ascension);

            DataBaseSkill.SavePlayerSkill(player, SkillType.Basic);
            DataBaseSkill.SavePlayerSkill(player, SkillType.Ascension);
            DataBaseSkill.SavePlayerSkill(player, SkillType.Passive);

            DataBaseQuest.SavePlayerQuest(player);

            PlayersOnline.Remove(player);
        }
Exemple #2
0
        public void AddStartPlayerAbility(Player Player)
        {
            // todo correct retail ability list

            switch (Player.PlayerData.Class)
            {
            case PlayerClass.Blademan:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(10, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(11, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(12, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(13, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(14, 0));
                break;

            case PlayerClass.Swordman:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(20, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(21, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(22, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(23, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(24, 0));
                break;

            case PlayerClass.Spearman:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(30, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(31, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(32, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(33, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(34, 0));
                break;

            case PlayerClass.Bowman:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(40, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(41, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(42, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(43, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(44, 0));
                break;

            case PlayerClass.Medic:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(50, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(51, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(52, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(53, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(54, 0));
                break;

            case PlayerClass.Ninja:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(60, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(61, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(62, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(63, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(64, 0));
                break;

            case PlayerClass.Busker:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(70, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(71, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(72, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(73, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(74, 0));
                break;

            case PlayerClass.Hanbi:
                Player.Abilities.Add(0, new KeyValuePair <int, int>(10, 0));
                Player.Abilities.Add(1, new KeyValuePair <int, int>(11, 0));
                Player.Abilities.Add(2, new KeyValuePair <int, int>(12, 0));
                Player.Abilities.Add(3, new KeyValuePair <int, int>(13, 0));
                Player.Abilities.Add(4, new KeyValuePair <int, int>(14, 0));
                break;
            }

            DataBaseAbility.SavePlayerAbility(Player, SkillType.Basic, false);
        }