|
@@ -8,12 +8,22 @@ namespace ET
|
|
|
{
|
|
|
protected override async ETTask Run(Session session, M2C_NoticeStudioPlayTimes message)
|
|
|
{
|
|
|
- StudioDataManager.Instance.NoticeStudioPlayTimes(message);
|
|
|
+ StudioDataManager.Instance.NoticeStudioPlayTimes(message.ChapterId, message.PlayTimes);
|
|
|
EventAgent.DispatchEvent(ConstMessage.NOTICE_STUDIO_PLAY_TIMES);
|
|
|
|
|
|
await ETTask.CompletedTask;
|
|
|
}
|
|
|
}
|
|
|
+ public class NoticeFilingScoreBonusChanged : AMHandler<S2C_FilingScoreBonusChanged>
|
|
|
+ {
|
|
|
+ protected override async ETTask Run(Session session, S2C_FilingScoreBonusChanged message)
|
|
|
+ {
|
|
|
+ // StudioDataManager.Instance.NoticeFilingScoreBonusChanged(message);
|
|
|
+ EventAgent.DispatchEvent(ConstMessage.FILING_SCORE_CHANGE);
|
|
|
+
|
|
|
+ await ETTask.CompletedTask;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
namespace GFGGame
|
|
|
{
|
|
@@ -31,7 +41,7 @@ namespace GFGGame
|
|
|
{
|
|
|
for (int i = 0; i < response.infos.Count; i++)
|
|
|
{
|
|
|
- StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes };
|
|
|
+ StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes, ChapterScore = response.infos[i].ChapterScore, };
|
|
|
StudioDataManager.Instance.RspStudioInfos(studioData);
|
|
|
}
|
|
|
// EventAgent.DispatchEvent(ConstMessage.GET_STUDIO_INFO);
|
|
@@ -54,5 +64,20 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //领取查阅建档分数宝箱
|
|
|
+ public static async ETTask ReqFilingScoreRewards(int chapterId)
|
|
|
+ {
|
|
|
+ S2C_GetFilingScoreBonus response = null;
|
|
|
+ response = (S2C_GetFilingScoreBonus)await MessageHelper.SendToServer(new C2S_GetFilingScoreBonus() { ChapterId = chapterId });
|
|
|
+ if (response != null)
|
|
|
+ {
|
|
|
+ if (response.Error == ErrorCode.ERR_Success)
|
|
|
+ {
|
|
|
+ StudioDataManager.Instance.RspFilingScoreReward(response.ChapterId, response.BonusIndexList);
|
|
|
+ EventAgent.DispatchEvent(ConstMessage.FILING_SCORE_CHANGE);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|