43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
|
|
|
|
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()}";
|
|
}
|
|
} |