초기커밋
This commit is contained in:
43
GameServer/Ticker/CaliumStorageRetryTicker.cs
Normal file
43
GameServer/Ticker/CaliumStorageRetryTicker.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class CaliumStorageRetryTicker : EntityTicker
|
||||
{
|
||||
public CaliumStorageRetryTicker(double onTickIntervalMilliseconds, CancellationTokenSource? cts)
|
||||
: base(EntityType.CaliumEventTicker, onTickIntervalMilliseconds, cts)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override async Task onTaskTick()
|
||||
{
|
||||
var calium_storage_entity = GameServerApp.getServerLogic().findGlobalEntity<CaliumStorageEntity>();
|
||||
NullReferenceCheckHelper.throwIfNull(calium_storage_entity, () => "calium storage entity is null !!!");
|
||||
|
||||
var calium_storage_action = calium_storage_entity.getEntityAction<CaliumStorageAction>();
|
||||
NullReferenceCheckHelper.throwIfNull(calium_storage_action, () => $"calium_storage_action is null !!! - {calium_storage_entity.toBasicString()}");
|
||||
|
||||
// 1. Redis Retry Key 조회
|
||||
var check_retry = await calium_storage_action.checkRetryCaliumEchoSystem();
|
||||
if (false == check_retry) return;
|
||||
|
||||
// 2. Retry 실시
|
||||
await calium_storage_action.onFillUpDailyCalium();
|
||||
}
|
||||
|
||||
public override string toBasicString()
|
||||
{
|
||||
return $"{this.getTypeName()}";
|
||||
}
|
||||
|
||||
public override string toSummaryString()
|
||||
{
|
||||
return $"{this.getTypeName()}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user