mirror of
https://github.com/rafi1212122/PemukulPaku
synced 2025-12-15 05:04:34 +01:00
use fragment material and avatar star up also prevent capt. exp overflow
this took wayyyyyyyyyy longer than it shoud be
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using MongoDB.Bson;
|
||||
using Common.Resources.Proto;
|
||||
using MongoDB.Driver;
|
||||
using Common.Utils.ExcelReader;
|
||||
|
||||
namespace Common.Database
|
||||
{
|
||||
@@ -79,10 +80,20 @@ namespace Common.Database
|
||||
{
|
||||
User.collection.ReplaceOne(Builders<UserScheme>.Filter.Eq(user => user.Id, Id), this);
|
||||
}
|
||||
|
||||
public uint GetCreationTime()
|
||||
{
|
||||
return (uint)((DateTimeOffset)Id.CreationTime).ToUnixTimeSeconds();
|
||||
}
|
||||
|
||||
public void AddExp(int exp)
|
||||
{
|
||||
Exp += exp;
|
||||
if (Exp > PlayerLevelData.GetInstance().GetMaxPossibleExp())
|
||||
{
|
||||
Exp = PlayerLevelData.GetInstance().GetMaxPossibleExp();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user