24 lines
914 B
C#
Executable File
24 lines
914 B
C#
Executable File
using ET.EventType;
|
|
|
|
namespace ET
|
|
{
|
|
public class AfterEnterGameEvent:AEvent<AfterEnterGame>
|
|
{
|
|
public override async ETTask Run(AfterEnterGame args)
|
|
{
|
|
var unit = args.unit;
|
|
await ETTask.CompletedTask;
|
|
//同步玩家的信息
|
|
//宠物
|
|
//任务
|
|
//签到
|
|
bool isGetSininReward = ActiveComponent.instance.QuerySigninReward(unit, out var config);
|
|
int currConfigId = (int) config.Id;
|
|
PlayerData data = unit.GetComponent<PlayerData>();
|
|
var activeMessage = new M2C_SendActiveInfo() { isGetSininReward = isGetSininReward, signinCurrId = currConfigId,signinInMonthCount = data.signInCountInMonth};
|
|
activeMessage.gotSignInMonthList.AddRange(data.signInGetRewardCountInMonthList);
|
|
MessageHelper.SendActor(unit,activeMessage);
|
|
|
|
}
|
|
}
|
|
} |