30 lines
1018 B
C#
30 lines
1018 B
C#
using Google.Protobuf;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
using ServerCommon;
|
|
using ServerCommon.BusinessLogDomain;
|
|
using MetaAssets;
|
|
|
|
|
|
namespace GameServer;
|
|
|
|
public class NotifyUgcNpcRankRefreshHandler
|
|
{
|
|
public async Task recvUgcNpcRankRefresh(ServerMessage.Types.GS2GS_NTF_UGC_NPC_RANK_REFRESH notify)
|
|
{
|
|
var ugc_npc_rank_entity = GameServerApp.getServerLogic().findGlobalEntity<UgcNpcRankEntity>();
|
|
NullReferenceCheckHelper.throwIfNull(ugc_npc_rank_entity, () => $"ugc_npc_rank_entity is null !!!");
|
|
var action = ugc_npc_rank_entity.getEntityAction<UgcNpcRankManageAction>();
|
|
NullReferenceCheckHelper.throwIfNull(ugc_npc_rank_entity, () => $"ugc_npc_rank_entity is null !!!");
|
|
NullReferenceCheckHelper.throwIfNull(action, () => $"action is null !!!");
|
|
|
|
// reload data
|
|
await action.reloadAllUgcNpcRanks();
|
|
|
|
// notify to client
|
|
await action.notifyClientUgcNpcRankRefresh(false);
|
|
}
|
|
} |