mirror of
https://github.com/rafi1212122/BLHX.Server.git
synced 2025-12-12 22:44:36 +01:00
this took soo long, but here you are wells
This commit is contained in:
@@ -76,7 +76,7 @@ namespace BLHX.Server.Game
|
||||
if (!attr.IsNotifyHandler)
|
||||
packetIdx++;
|
||||
if (!attr.SaveDataAfterRun)
|
||||
DBManager.PlayerContext.SaveChanges();
|
||||
DBManager.PlayerContext.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -138,6 +138,20 @@ namespace BLHX.Server.Game
|
||||
ns.Write(sendBuf);
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
{
|
||||
foreach (var resourceField in player.ResourceFields)
|
||||
{
|
||||
resourceField.CalculateYield();
|
||||
}
|
||||
|
||||
DBManager.PlayerContext.Save();
|
||||
this.NotifyResourceList();
|
||||
#if DEBUG
|
||||
c.Log($"Tick");
|
||||
#endif
|
||||
}
|
||||
|
||||
public void InitClientData()
|
||||
{
|
||||
this.NotifyPlayerData();
|
||||
|
||||
Reference in New Issue
Block a user