23 lines
594 B
C#
23 lines
594 B
C#
namespace ET.Server
|
|
{
|
|
[Event(SceneType.Gate)]
|
|
public class PlayerSessionDispose_FlushDb : AEvent<Scene, PlayerSessionDispose>
|
|
{
|
|
protected override async ETTask Run(Scene scene, PlayerSessionDispose args)
|
|
{
|
|
if (string.IsNullOrEmpty(args.Account))
|
|
{
|
|
return;
|
|
}
|
|
|
|
DBSaveComponent dbSaveComponent = scene.GetComponent<DBSaveComponent>();
|
|
if (dbSaveComponent == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
await dbSaveComponent.FlushNow(args.Account);
|
|
}
|
|
}
|
|
}
|