the initial commit to the repo.
This commit is contained in:
parent
025c032b8c
commit
1b757591b9
264 changed files with 21882 additions and 0 deletions
41
EscapeFromTarkovCheat/Features/ExperienceManager.cs
Normal file
41
EscapeFromTarkovCheat/Features/ExperienceManager.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using EFT;
|
||||
using EFT.Counters;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EscapeFromTarkovCheat.Features
|
||||
{
|
||||
public static class ExperienceManager
|
||||
{
|
||||
public static long current = 0;
|
||||
public static void SetExperience(Player player, float experience)
|
||||
{
|
||||
if (player != null && player.Profile != null)
|
||||
{
|
||||
current = Get(player);
|
||||
player.Profile.EftStats.SessionCounters.SetLong((long)experience, CounterTag.Exp);
|
||||
current = (long)experience;
|
||||
Debug.Log(string.Format("Experience set to {0}", experience));
|
||||
}
|
||||
}
|
||||
public static void AddExperience(Player player, float experience)
|
||||
{
|
||||
if (player != null && player.Profile != null)
|
||||
{
|
||||
current = Get(player);
|
||||
SetExperience(player, current + experience);
|
||||
}
|
||||
}
|
||||
public static int Get(Player player)
|
||||
{
|
||||
if (player != null && player.Profile != null)
|
||||
{
|
||||
return player.Profile.EftStats.SessionCounters.GetInt(CounterTag.Exp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue