PlayerInfoPushCtrl.cs 839 B

1234567891011121314151617181920212223242526
  1. using XGame.Framework.Network;
  2. namespace FL.Network
  3. {
  4. public class PlayerInfoPushCtrl : MsgController<PlayerInfoPush>
  5. {
  6. protected override void OnProcess(PlayerInfoPush message, object context)
  7. {
  8. var dto = new LoginPlayerInfoDto()
  9. {
  10. accountId = message.uid,
  11. lastServerId = message.sid,
  12. token = message.token,
  13. };
  14. if (message.list != null )
  15. {
  16. dto.serverPlayerMap = new System.Collections.Generic.Dictionary<int, PlayerInfoListOne>();
  17. foreach ( var item in message.list )
  18. {
  19. dto.serverPlayerMap.Add(item.sid, item);
  20. }
  21. }
  22. EventSingle.Instance.Notify(EventDefine.LoginPlayerInfos, dto);
  23. }
  24. }
  25. }