Exemple #1
0
    public bool LevelUp()
    {
        if (!ExpMetadataStorage.LevelExist((short)(Level + 1)))
        {
            return(false);
        }

        Level++;

        Player.Stats.AddBaseStats(Player);
        Player.FieldPlayer.RecoverHp(FieldPlayer.Stats[StatId.Hp].Bonus);

        Session.FieldManager.BroadcastPacket(RevivalConfirmPacket.Send(FieldPlayer.ObjectId, 0));
        Session.FieldManager.BroadcastPacket(LevelUpPacket.LevelUp(FieldPlayer.ObjectId, Level));
        Session.FieldManager.BroadcastPacket(FieldObjectPacket.UpdateCharacterLevel(Player));

        Session.FieldManager.BroadcastPacket(JobPacket.SendJob(FieldPlayer));

        Session.Send(StatPacket.SetStats(FieldPlayer));
        Session.FieldManager.BroadcastPacket(StatPacket.UpdateFieldStats(FieldPlayer), Session);

        Session.Send(KeyTablePacket.SendFullOptions(Player.GameOptions));

        TrophyManager.OnLevelUp(Player);
        QuestHelper.GetNewQuests(Player);
        return(true);
    }
Exemple #2
0
    public bool LevelUp()
    {
        if (!ExpMetadataStorage.LevelExist((short)(Level + 1)))
        {
            return(false);
        }

        Level++;

        Player.Stats.AddBaseStats(Player);
        Player.FieldPlayer.RecoverHp(FieldPlayer.Stats[StatAttribute.Hp].Bonus);

        Player.UpdateSocials();
        TrophyManager.OnLevelUp(Player);
        QuestHelper.GetNewQuests(Player);

        return(true);
    }
Exemple #3
0
    public bool LevelUp()
    {
        if (!ExpMetadataStorage.LevelExist((short)(Level + 1)))
        {
            return(false);
        }

        Level++;

        TrophyManager.OnLevelUp(Player);

        Player.StatPointDistribution.AddTotalStatPoints(5);
        Player.Session.FieldManager.BroadcastPacket(ExperiencePacket.LevelUp(Player.FieldPlayer, Level));
        // TODO: Gain max HP
        Player.FieldPlayer.RecoverHp(Player.FieldPlayer.Stats[StatId.Hp].Bonus);
        Player.Session.Send(StatPointPacket.WriteTotalStatPoints(Player));

        QuestHelper.GetNewQuests(Player);
        return(true);
    }
Exemple #4
0
    public bool LevelUp()
    {
        if (!ExpMetadataStorage.LevelExist((short)(Level + 1)))
        {
            return(false);
        }

        Level++;

        TrophyManager.OnLevelUp(Player);

        Player.Stats.AddBaseStats(Player);
        Player.FieldPlayer.RecoverHp(FieldPlayer.Stats[StatId.Hp].Bonus);

        Session.FieldManager.BroadcastPacket(ExperiencePacket.LevelUp(FieldPlayer.ObjectId, Level));
        Session.Send(StatPacket.SetStats(FieldPlayer));

        QuestHelper.GetNewQuests(Player);
        return(true);
    }