水电费

This commit is contained in:
bob
2025-07-16 17:47:53 +08:00
parent 7cccd2a81c
commit 3bd1ffbb75
75 changed files with 2148 additions and 1265 deletions

View File

@@ -0,0 +1,20 @@
using Fantasy.Entitas.Interface;
using Fantasy.Gate;
namespace System.Gate;
public sealed class GameAccountFlagComponentDestroySystem : DestroySystem<GameAccountFlagComponent>
{
protected override void Destroy(GameAccountFlagComponent self)
{
if (self.AccountID != 0)
{
// 执行下线过程、并且要求在5分钟后完成缓存清理。也就是5分钟后会保存数据到数据库。
// 由于5分钟太长了、咱们测试的时候不方便测试也可以把这个时间改短一些比如10秒。
GameAccountHelper.Disconnect(self.Scene, self.AccountID, 1000 * 60 * 5).Coroutine();
self.AccountID = 0;
}
self.Account = null;
}
}